login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064550 Define Hofstadter's batrachian Q-sequence (A005185) by Q(0) = Q(1) = 1, Q(n)=Q(n-Q(n-1))+Q(n-Q(n-2)), n > 1; then a(1) = 2, a(n)=a(n-1)+2*Q(n)-n, n > 1. 3
1, 2, 4, 7, 9, 12, 16, 19, 23, 26, 28, 33, 37, 40, 46, 49, 53, 58, 62, 67, 71, 74, 76, 85, 89, 92, 98, 103, 107, 110, 120, 123, 125, 132, 140, 143, 147, 154, 158, 163, 169, 174, 180, 185, 189, 192, 194, 211, 211, 212, 222, 227, 227, 234, 240, 241 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Prime-like simulation using Hofstadter's Batrachian sequence as difference generator.

REFERENCES

Simone Caramel, personal communication, also postings to newsgroups.

Clifford Pickover, article on the crying of Batrachian sequences

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Roger L. Bagula, A Simulation of a Prime Type of Sequence: The Hofstadter Integers

MAPLE

A064550 := proc(n) option remember; if n=0 then 1 else A064550(n-1)+2*A005185(n-1)(n) - n; fi; end;

MATHEMATICA

q[0] = q[1] = 1; q[n_] := q[n - q[n - 1]] + q[n - q[n - 2]]; a[1] = 2; a[n_] := a[n] = a[n - 1] + 2*(q[n] - n/2); Table[ a[n], {n, 1, 70} ]

PROG

(ARIBAS): function a064550(maxarg: integer); var n, r, rm, q: integer; qar: array; begin qar := alloc(array, maxarg + 1); qar[0] := 1; for n := 1 to maxarg do if n < 2 then q := 1; else q := qar[n - qar[n - 1]] + qar[n - qar[n - 2]]; end; qar[n] := q; if n = 1 then r := 2; else r := rm + round(2*(q - n/2)); end; rm := r; write(r, " "); end; end; a064550(65).

(Haskell)

a064550 n = a064550_list !! n

a064550_list = 1 : 2 : zipWith3 (\a q n -> a + 2 * q - n)

    (tail a064550_list) (drop 2 a005185_list) [2..]

-- Reinhard Zumkeller, May 13 2012

CROSSREFS

Cf. A064551, A064552, A005185.

Sequence in context: A065560 A134886 A024193 * A186357 A212988 A064491

Adjacent sequences:  A064547 A064548 A064549 * A064551 A064552 A064553

KEYWORD

nonn,nice,easy

AUTHOR

Roger L. Bagula, Oct 08 2001

EXTENSIONS

More terms from Vladeta Jovovic, Klaus Brockhaus and Matthew Conroy, Oct 09 2001

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 7 08:08 EDT 2020. Contains 336274 sequences. (Running on oeis4.)