login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A172009 Number of minimal SNUSP programs using +, -, @ and # that yield n. 0
1, 1, 2, 2, 2, 2, 2, 2, 6, 12, 4, 8, 2, 4, 4, 10, 4, 2, 12, 4, 2, 6, 8, 10, 2, 2, 2, 2, 2, 2, 10, 2, 8, 2, 14, 22, 8, 2, 18, 8, 4, 14, 4, 12, 2, 4, 2, 8, 6, 2, 6, 6, 10, 2, 2, 4, 6, 4, 4, 2, 4, 2, 22, 8, 2, 4, 2, 2, 4, 6, 24, 6, 2, 2, 12, 2, 12, 4, 2, 2, 6, 6, 12, 18, 6, 4, 6, 6, 2, 2, 2, 2, 8, 12, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
SNUSP is a programming language where each command is an individual letter. The four of concern here are +, -, @ and #. + increments the current data value, - decrements it, @ is a "subroutine call" and # is a "return". When an @ is encountered, a record of the location is put on a stack and execution continues. When a # is encountered, if there is a return point on the stack, the execution continues at that a single character beyond that return point. If there is no return point on the stack, execution terminates.
Thus "@@++#" would put the first two "@" return points on the stack, increment data twice, return from the second "@" to the last "+", increment the data once more, return from the first "@" to the first "+", increment the data two more times and finally terminate when it hits the "#" with no return points on the stack. The data is always initialized to zero so this effectively puts 5 into the data. In order to place a particular value into the data, there are one or more minimal strings of these characters. The i-th term of the sequence is the number of minimal SNUSP programs using only these characters. After 2, all sequences end in either +++ or @++, which are equivalent, so all values above a(2) are even.
LINKS
EXAMPLE
There are 12 minimal programs which yield 10: +@+++++# @@-++++# -@@++++# -@+@+++# +@-@+++# ++@@+++# +@++@++# @@-+@++# -@@+@++# -@+@@++# +@-@@++# ++@@@++#. Thus a(10) = 12.
PROG
(Other) See A172005.
CROSSREFS
Sequence in context: A351023 A140818 A139813 * A299150 A202448 A339165
KEYWORD
nonn
AUTHOR
Darrell Plank (jar_czar(AT)msn.com), Jan 22 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 13:49 EDT 2024. Contains 371958 sequences. (Running on oeis4.)