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!)
A038135 Pseudo Q-numbers. 1
0, 1, 1, 1, 3, 7, 9, 4, 5, 10, 16, 17, 11, 5, 12, 20, 23, 17, 9, 20, 18, 13, 14, 33, 43, 31, 28, 27, 2, 29, 4, 57, 34, 73, 33, 2, 34, 6, 71, 114, 90, 4, 71, 116, 117, 28, 9, 91, 248, 161, 4, 91, 362, 232, 6, 161, 4, 323, 6, 393, 6, 322, 4, 716, 6, 715, 6, 644, 4, 1431, 6, 1359, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(n)=a(abs(n-a(n-1)))+a(abs(n-a(n-2)))+a(abs(n-a(n-3)), a(j)=0 for j>n.
MATHEMATICA
a[0] = 0; a[1] = a[2] = a[3] = 1; a[n_] := a[n] = Module[{b}, b[j_ /; j > n] = 0; b[j_] := a[j]; b[Abs[n - b[n-1]]] + b[Abs[n - b[n-2]]] + b[Abs[n - b[n-3]]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 23 2016 *)
PROG
(Haskell)
import Data.List (genericIndex)
a038135 n = genericIndex a038135_list n
a038135_list = 0 : 1 : 1 : 1 : f 1 1 1 4 where
f u v w x = y : f v w y (x + 1) where
y = q (x - u) + q (x - v) + q (x - w)
q z = if abs z >= x then 0 else a038135 $ abs z
-- Reinhard Zumkeller, Sep 21 2014
CROSSREFS
Cf. A005185.
Sequence in context: A198236 A071641 A093336 * A087655 A016621 A342354
KEYWORD
nice,nonn
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Apr 04 2000
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 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)