Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A053615
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A053615 Pyramidal sequence: distance to nearest product of two consecutive integers (pronic or heteromecic numbers). +0
3
0, 1, 0, 1, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7 (list; graph; listen)
OFFSET

0,5

COMMENT

a(A002378(n))=0; a(n^2)=n.

FORMULA

a(n)=A004738(n+1)-1

Let u(1)=1, u(n)=n-u(n-sqrtint(n)) (cf. A037458); then a(0)=0 and for n>0 a(n)=2*u(n)-n. - Benoit Cloitre, Dec 22 2002

a(0)=0 then a(n)=floor(sqrt(n))-a(n-floor(sqrt(n))) - Benoit Cloitre (benoit7848c(AT)orange.fr), May 03 2004

EXAMPLE

a(10)=|10-3*4|=2

PROGRAM

(PARI) a(n)=if(n<1, 0, sqrtint(n)-a(n-sqrtint(n)))

CROSSREFS

Cf. A002262, A002378, A004738, A053188.

Adjacent sequences: A053612 A053613 A053614 this_sequence A053616 A053617 A053618

Sequence in context: A037835 A116433 A106509 this_sequence A002819 A037834 A004074

KEYWORD

easy,nice,nonn

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), Mar 20 2000

page 1

Search completed in 0.006 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 13 02:37 EDT 2008. Contains 145008 sequences.


AT&T Labs Research