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!)
A006338 An "eta-sequence": floor((n+1)*sqrt(2) + 1/2) - floor(n*sqrt(2) + 1/2).
(Formerly M0087)
5
2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Equals its own "second derivative" (cf. A006337).

Presumably this is the same as the following sequence from Hofstadter's book: the number of triangular numbers between each successive pair of squares. More precisely, a(n) is the number of triangular numbers T such that n^2 <= T < (n+1)^2. E.g., a(3) = 2 because 3^2 <= T < 4^2 permits T(4) = 10 and T(5) = 15 and no other triangular number. - Hugo van der Sanden, May 03 2005.

a(n) = A214848(n) = A022846(n+1) - A022846(n). - Reinhard Zumkeller, Mar 03 2014

REFERENCES

Douglas Hofstadter, "Fluid Concepts and Creative Analogies", Chapter 1: "To seek whence cometh a sequence".

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

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

D. R. Hofstadter, Eta-Lore [Cached copy, with permission]

D. R. Hofstadter, Pi-Mu Sequences [Cached copy, with permission]

D. R. Hofstadter and N. J. A. Sloane, Correspondence, 1977 and 1991

FORMULA

a(n) = floor((n+1)*sqrt(2) + 1/2) - floor(n*sqrt(2) + 1/2). - G. C. Greubel, Nov 18 2017

MATHEMATICA

a[n_] := Floor[(n+1)*Sqrt[2]+1/2] - Floor[n*Sqrt[2]+1/2]; Table[a[n], {n, 1, 105}] (* Jean-Fran├žois Alcover, Nov 24 2015 *)

PROG

(Haskell)

a006338 n = a006338_list !! (n-1)

a006338_list = tail a214848_list

-- Reinhard Zumkeller, Mar 03 2014

(PARI) for(n=1, 30, print1(floor((n+1)*sqrt(2) + 1/2) - floor(n*sqrt(2) + 1/2), ", ")) \\ G. C. Greubel, Nov 18 2017

(MAGMA) [Floor((n+1)*Sqrt(2)+1/2) - Floor(n*Sqrt(2)+1/2): n in [1..30]]; // G. C. Greubel, Nov 18 2017

CROSSREFS

Cf. A006337, A022846, A214848.

Sequence in context: A214856 A006337 A214848 * A020903 A133083 A083921

Adjacent sequences:  A006335 A006336 A006337 * A006339 A006340 A006341

KEYWORD

nonn,easy,nice

AUTHOR

D. R. Hofstadter, Jul 15 1977

EXTENSIONS

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 28 2003

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 June 20 01:09 EDT 2021. Contains 345154 sequences. (Running on oeis4.)