cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A065312 Primes which occur exactly once in A065308 (prime(n - pi(n))).

Original entry on oeis.org

7, 11, 19, 23, 37, 41, 47, 53, 59, 61, 73, 79, 83, 89, 101, 103, 113, 127, 137, 139, 149, 151, 163, 167, 173, 179, 193, 197, 199, 211, 227, 229, 241, 251, 257, 263, 271, 277, 283, 293, 307, 311, 317, 331, 337, 347, 349, 353, 367, 373, 389, 397, 419, 421, 433
Offset: 1

Views

Author

Labos Elemer, Oct 29 2001

Keywords

Comments

In A065308 each odd prime seems to appear once or twice. Prime 2 arises there 3 times.

Crossrefs

Programs

  • Mathematica
    With[{s = Array[Prime[# - PrimePi[#]] &, 120]}, Most@ Select[Split[s], Length@ # == 1 &][[All, 1]] ] (* Michael De Vlieger, Jun 19 2018 *)
  • PARI
    { n=0; p=1; f=2; m=1; for (i=1, 10^9, a=0; p=nextprime(p + 1); while (p==f, a++; m++; f=prime(m - primepi(m))); if (a==1, write("b065312.txt", n++, " ", p); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 16 2009

A065610 Smallest number m so that n^2 + A000330(m) is also a square, i.e., n^2 + (1 + 4 + 9 + 16 + ... + m^2) = w^2 for some w.

Original entry on oeis.org

1, 47, 2, 5, 767, 16, 1727, 22, 17, 13, 18, 112, 10, 70, 8, 10799, 12287, 21, 82, 17327, 31, 15, 255, 16, 10, 13, 9, 5, 49, 40367, 43199, 117, 17, 1630, 7, 58799, 10, 65711, 34, 73007, 49, 13, 64, 29, 17, 6, 9, 30, 42, 309, 8, 124847, 17, 31, 139967, 13, 150527, 15
Offset: 0

Views

Author

Labos Elemer, Nov 07 2001

Keywords

Comments

I.e., a(n) is the least solution to n^2 + (x(x+1)(2x+1)/6) = w^2; a(n) is the length of shortest sum of consecutive squares from 1 to a(n) which when added to n^2 gives a new square.

Examples

			n = 3: a(3) = 5 because n^2 + 1 + 4 + 9 + 16 + 25 = 9 + (1 + 4 + 9 + 16 + 25) = 64 = 8*8; n = 4: a(4) = 767 because n^2 + (1 + 4 + ... + 767^2) = 150700176 = 12276*12726, where 767 is the length of the shortest such consecutive-square sequence which provides (when summed) a new square, namely 12276^2. Often the least solution is rather large. E.g., at n = 93, a(n) = 415151, which means that 93^2 + A000330(415151) = 8649 + (long square sum) = 154436265^2 = 23850559947150225 is the smallest such square number, sum odd distinct consecutive squares except one repetition(8649).
		

Crossrefs

Programs

  • Mathematica
    s=n^2 Do[s=s+m^2; If[IntegerQ[Sqrt[s]], Print[m]], {m, 1, 500000}] (* gives solutions of which the smallest is entered into the sequence *)

Formula

n^2 + (1 + 4 + 9 + ... + a(n)^2) = w^2, where w depends also on n; i.e., sum of consecutive squares from 1, 4, ... to a(n)^2 + n^2 is also a square.

A065611 Let k be the least integer such that n^2 + Sum_{m=1..k} m^2 is a perfect square, then a(n) is the resulting square.

Original entry on oeis.org

1, 35721, 9, 64, 150700176, 1521, 1718434116, 3844, 1849, 900, 2209, 474721, 529, 116964, 400, 419845682025, 618399795456, 3600, 187489, 1734149230641, 10816, 1681, 5560164, 2025, 961, 1444, 961, 784, 41209, 21926752125201
Offset: 0

Views

Author

Labos Elemer, Nov 07 2001

Keywords

Comments

I.e., n^2 + {1 + 4 + 9 + 16 + ... + m^2} = a(n) = A065612(n)^2 = A065311(n). a(n) is the smallest square obtained as n^2 + x*(x+1)*(2x+1)/6 where x = A065610(n).

Examples

			n = 3: a(3) = 64 because n^2 + 1 + 4 + 9 + 16 + 25 = 9 + (1 + 4 + 9 + 16 + 25) = 64 = 8^2;
n = 4: a(4) = 150700176 because n^2 + (1 + 4 + ... + 767^2) = 150700176 = 12276^2, where 767 is the length of the shortest such consecutive-square sequence which provides(when summed) a new square, namely 12276^2. Often the least solution is rather large. E.g., a(93) = 23850559947150225 which means that 93^2 + A000330(415151) = 8649 + [a long square sum] = 154436265^2 = 23850559947150225.
		

Crossrefs

Programs

  • Mathematica
    Do[s = n^2; k = 1; While[s = s + k^2; !IntegerQ[ Sqrt[s]], k++ ]; Print[s], {n, 0, 30} ]
  • PARI
    { for (n = 0, 500, s=n^2 + 1; k=1; while (!issquare(s), k++; s+=k^2); write("b065611.txt", n, " ", s) ) } \\ Harry J. Smith, Oct 23 2009
    
  • PARI
    a(n) = my(s=n^2+1, k=1); while (!issquare(s), k++; s+=k^2); s; \\ Michel Marcus, Mar 24 2020

Extensions

Edited by Jon E. Schoenfield, Jun 14 2018
Name clarified by Michel Marcus, Mar 24 2020

A065994 a(n) = prime(prime(n) - n).

Original entry on oeis.org

2, 2, 3, 5, 13, 17, 29, 31, 43, 67, 71, 97, 107, 109, 131, 157, 181, 191, 223, 233, 239, 269, 281, 313, 359, 379, 383, 401, 409, 431, 503, 523, 569, 571, 619, 631, 659, 691, 719, 751, 787, 797, 857, 859, 881, 883, 971, 1039, 1061, 1063, 1091, 1117, 1123
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 10 2001

Keywords

Comments

a(n) = A065311(n-2) for 3 < n <= 10000. - Georg Fischer, Oct 19 2018

Crossrefs

Programs

  • Maple
    A065994:=n->ithprime(ithprime(n)-n): seq(A065994(n), n=1..100); # Wesley Ivan Hurt, Jan 21 2017
  • Mathematica
    Table[Prime[Prime[n]-n],{n,60}] (* Harvey P. Dale, Sep 04 2011 *)
  • PARI
    { for (n=1, 1000, a=prime(prime(n) - n); write("b065994.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 06 2009

Formula

a(n) = A000040(A014689(n)). - Reinhard Zumkeller, Aug 06 2003
Showing 1-4 of 4 results.