From Esolang
Jump to navigation Jump to search
Paradigm(s) Declarative
Designed by User:Hakerh400
Appeared in 2022
Computational class Not applicable
Major implementations Implemented
File extension(s) .txt

Daydream is an esoteric programming language invented found by User:Hakerh400 in 2022.


Let be an infinite list of natural numbers. The initial (-th) element is . The -th element is equal to the sum of all previous elements that are not divisible by .

Source code consists of a single natural number . The output are the first elements of sequence , separated by spaces. Input is ignored.


The author saw the specification of this language in a dream. Despite the language being useless, the author decided to document it anyway.

Terms of the sequence

Access Daydream/Terms to see the first 100 terms of the sequence.


Since the language is pointless, here is a pointless implementation in Haskell:

i = id
k = const
(#) = flip
infixr 9 #
infixr 9 !
f g = g (f g)
(!) a b c = a c (b c)
t a b c = if a then b else c

main=getLine>>=( show.f(((take.fromIntegral)#).