login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A273185 Start with a(0) = 0. Thereafter a(n) is the number of m < n with the property that a(m) + n is a perfect square. 2
0, 1, 0, 1, 2, 0, 0, 1, 3, 4, 0, 0, 1, 1, 1, 6, 6, 0, 0, 2, 0, 1, 1, 2, 8, 9, 0, 1, 1, 0, 2, 0, 1, 1, 4, 12, 12, 2, 0, 0, 1, 1, 0, 2, 0, 2, 1, 7, 15, 17, 0, 0, 2, 0, 0, 1, 1, 1, 2, 0, 2, 1, 10, 19, 22, 0, 1, 0, 0, 2, 0, 1, 1, 1, 1, 2, 0, 2, 2, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

LINKS

Peter Kagey, Table of n, a(n) for n = 0..10000

EXAMPLE

a(3) = 1 because 3 + a(1) is a perfect square.

a(4) = 2 because 4 + a(0) and 4 + a(2) are perfect squares.

MATHEMATICA

a = {0}; Do[AppendTo[a, Count[a + n, k_ /; IntegerQ@ Sqrt@ k]], {n, 79}]; a (* Michael De Vlieger, May 25 2016 *)

PROG

(Java)

int n = 1000;

int[] terms = new int[n];

for (int i = 0; i < n; i++) {

     for (int j = 0; j < i; j++) {

          if (Math.sqrt(i+terms[j]) == Math.floor(Math.sqrt(i+terms[j]))) {

               terms[i]++;

          }

     }

     System.out.print(terms[i] + ", ");

}

CROSSREFS

Cf. A273190.

Sequence in context: A292133 A304482 A242464 * A259784 A145224 A138157

Adjacent sequences:  A273182 A273183 A273184 * A273186 A273187 A273188

KEYWORD

easy,nonn

AUTHOR

Alec Jones, May 17 2016

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 February 23 08:18 EST 2019. Contains 320420 sequences. (Running on oeis4.)