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-10 of 18 results. Next

A176032 Absolute values of A106044-A056892.

Original entry on oeis.org

1, 1, 3, 1, 3, 1, 7, 3, 5, 3, 1, 11, 3, 1, 9, 7, 5, 9, 11, 3, 1, 13, 15, 3, 13, 19, 15, 7, 3, 5, 11, 3, 9, 13, 15, 11, 1, 13, 21, 19, 7, 3, 17, 21, 27, 23, 1, 25, 27, 23, 15, 3, 1, 21, 31, 19, 7, 3, 9, 17, 21, 27, 1, 9, 13, 21, 23, 11, 9, 13, 21, 33, 27, 15, 3, 5, 17, 33, 39, 23, 3, 1, 21, 25
Offset: 1

Views

Author

Keywords

Comments

A106044 2,1,4,2,5,3,8,6,2,7,5,12,8,6,2,11,.. A056892 1,2,1,3,2,4,1,3,7,4,6,1,5,7,11,4,10,.. 2-1=1,2-1=1,4-1=3,3-2=1,5-2=3,...

Crossrefs

Programs

  • Mathematica
    f[n_]:=Floor[Sqrt[n]];lst={};Do[p=Prime[n];AppendTo[lst,Abs[((f[p]+1)^2-p)-(p-f[p]^2)]],{n,3*5!}];lst

A320688 Sum of the square excess A056892 of the primes between two squares.

Original entry on oeis.org

3, 4, 6, 11, 10, 24, 26, 34, 26, 33, 50, 67, 72, 46, 70, 109, 96, 132, 122, 153, 132, 145, 174, 229, 208, 175, 194, 287, 232, 244, 338, 267, 276, 345, 374, 239, 392, 396, 424, 390, 484, 373, 514, 563, 618, 424, 654, 821, 442, 557, 890, 814, 668, 741, 580, 642, 990, 811, 982, 968, 772
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Consider the primes p1,...,pK between two squares n^2 and (n+1)^2, and take the sum of the differences: (p1 - n^2) + ... + (pK - n^2). Obviously this equals (sum of these primes) - (number of these primes) * n^2.

Crossrefs

Row sums of A056892, read as a table.

Programs

  • Maple
    R:= NULL: p:= 2: n:= 1: t:= 0:
    while n <= 100 do
        t:= t + p-n^2;
        p:= nextprime(p);
        if p > (n+1)^2 then
         R:= R, t; t:= 0; n:= n+1;
        fi:
    od:
    R; # Robert Israel, Dec 17 2024
  • PARI
    a(n,s=0)={forprime(p=n^2,(n+1)^2,s+=p-n^2);s}

Formula

a(n) = A108314(n) - A014085(n)*A000290(n), where A000290(n) = n^2.

A056898 a(n) = smallest number m such that m^2+n is prime.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 3, 2, 1, 0, 1, 0, 3, 2, 1, 0, 1, 0, 3, 4, 1, 0, 7, 2, 9, 2, 1, 0, 1, 0, 3, 2, 3, 6, 1, 0, 3, 2, 1, 0, 1, 0, 3, 4, 1, 0, 5, 2, 3, 4, 1, 0, 5, 2, 9, 2, 1, 0, 1, 0, 3, 2, 3, 6, 1, 0, 9, 2, 1, 0, 1, 0, 3, 2, 5, 6, 1, 0, 3, 4, 1, 0, 5, 2, 9, 4, 1, 0, 7, 4, 3, 2, 3, 6, 1, 0, 3, 2
Offset: 1

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(8) = 3 since 3^2+8 = 17 which is prime.
		

Crossrefs

Programs

Formula

a(n) = sqrt(A056896(n)-n) = sqrt(A056897(n)).
For p a prime: a(p) = 0 (and a(p-1) = 1 if p<>3).

A056893 Smallest prime with square excess of n.

Original entry on oeis.org

2, 3, 7, 13, 41, 31, 23, 89, 73, 59, 47, 61, 113, 239, 79, 97, 593, 139, 163, 461, 277, 191, 167, 193, 281, 251, 223, 317, 353, 991, 431, 761, 433, 563, 359, 397, 521, 479, 439, 569, 617, 571, 619, 773, 829, 887, 947, 673, 1493, 1571, 727, 1013, 953, 1279
Offset: 1

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(4)=13 since 13=3^2+4, while 2, 3, 5, 7 and 11 have square excesses of 1, 2, 1, 3 and 3 respectively.
		

Crossrefs

Programs

  • Maple
    A056893 := proc(n)
        local p ;
        p :=2 ;
        while A053186(p) <> n do
            p := nextprime(p) ;
        end do:
        return p ;
    end proc: # R. J. Mathar, Jul 28 2013
  • PARI
    A056893(n)={
        local(p=2) ;
        while( A053186(p)!=n,
            p=nextprime(p+1)
        ) ;
        return(p)
    } /* R. J. Mathar, Jul 28 2013 */

Formula

a(n) =n+A056894(n).
a(n) = min{p in A000040: A053186(p) = n}. - R. J. Mathar, Jul 28 2013

A056896 Smallest prime which can be written as k^2 + n for k >= 0.

Original entry on oeis.org

2, 2, 3, 5, 5, 7, 7, 17, 13, 11, 11, 13, 13, 23, 19, 17, 17, 19, 19, 29, 37, 23, 23, 73, 29, 107, 31, 29, 29, 31, 31, 41, 37, 43, 71, 37, 37, 47, 43, 41, 41, 43, 43, 53, 61, 47, 47, 73, 53, 59, 67, 53, 53, 79, 59, 137, 61, 59, 59, 61, 61, 71, 67, 73, 101, 67, 67, 149, 73, 71
Offset: 1

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(8)=17 because 17=3^2+8.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 0; While[p = n + k^2; ! PrimeQ[p], k++]; p, {n, 100}] (* T. D. Noe, Apr 01 2011 *)

Formula

a(n) = A056897(n)+n = A056898(n)^2+n.
For p a prime: a(p)=p (and a(p-1)=p if p<>3).

Extensions

Example corrected by Harvey P. Dale, Apr 01 2011

A056897 Smallest square where a(n)+n is prime.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 9, 4, 1, 0, 1, 0, 9, 4, 1, 0, 1, 0, 9, 16, 1, 0, 49, 4, 81, 4, 1, 0, 1, 0, 9, 4, 9, 36, 1, 0, 9, 4, 1, 0, 1, 0, 9, 16, 1, 0, 25, 4, 9, 16, 1, 0, 25, 4, 81, 4, 1, 0, 1, 0, 9, 4, 9, 36, 1, 0, 81, 4, 1, 0, 1, 0, 9, 4, 25, 36, 1, 0, 9, 16, 1, 0, 25, 4, 81, 16, 1, 0, 49, 16, 9, 4, 9
Offset: 0

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(8)=9 since 9 is a square and 9+8=7 which is a prime
		

Crossrefs

Programs

  • Mathematica
    With[{sqs=Range[0,20]^2},Table[SelectFirst[sqs,PrimeQ[n+#]&],{n,100}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 07 2016 *)

Formula

a(n) =A056896(n)-n =A056898(n)^2

A104492 Cube excess of the n-th prime.

Original entry on oeis.org

1, 2, 4, 6, 3, 5, 9, 11, 15, 2, 4, 10, 14, 16, 20, 26, 32, 34, 3, 7, 9, 15, 19, 25, 33, 37, 39, 43, 45, 49, 2, 6, 12, 14, 24, 26, 32, 38, 42, 48, 54, 56, 66, 68, 72, 74, 86, 7, 11, 13, 17, 23, 25, 35, 41, 47, 53, 55, 61, 65, 67, 77, 91, 95, 97, 101, 115, 121, 4, 6, 10, 16, 24, 30
Offset: 1

Views

Author

Jonathan Vos Post, Mar 10 2005

Keywords

Examples

			a(48) = 7 because the 48th prime is 223 and 223 - 6^3 = 7, while 223 - 7^3 = -120.
		

Crossrefs

Programs

Formula

a(n) = A055400(A000040(n)).
a(n) = prime(n) - floor(prime(n)^(1/3))^3. - Jon E. Schoenfield, Jan 17 2015

A056894 If the smallest prime with a square excess of n is p then a(n)=p-n.

Original entry on oeis.org

1, 1, 4, 9, 36, 25, 16, 81, 64, 49, 36, 49, 100, 225, 64, 81, 576, 121, 144, 441, 256, 169, 144, 169, 256, 225, 196, 289, 324, 961, 400, 729, 400, 529, 324, 361, 484, 441, 400, 529, 576, 529, 576, 729, 784, 841, 900, 625, 1444, 1521, 676, 961, 900, 1225, 784
Offset: 1

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(4)=9 because the smallest prime with a square excess of 4 is 13 and 13-4=9
		

Crossrefs

Formula

a(n) = A056893(n) - n = A048760(A056893(n)) = A056895(n)^2

A056895 If the smallest prime with a square excess of n is p then a(n)^2 = p - n.

Original entry on oeis.org

1, 1, 2, 3, 6, 5, 4, 9, 8, 7, 6, 7, 10, 15, 8, 9, 24, 11, 12, 21, 16, 13, 12, 13, 16, 15, 14, 17, 18, 31, 20, 27, 20, 23, 18, 19, 22, 21, 20, 23, 24, 23, 24, 27, 28, 29, 30, 25, 38, 39, 26, 31, 30, 35, 28, 45, 34, 31, 42, 31, 34, 33, 32, 33, 36, 35, 34, 75, 40, 37, 36, 41, 48, 45
Offset: 1

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(4)=3 because the smallest prime with a square excess of 4 is 13 and 13 - 4 = 3^2.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[p = 2; While[n != p - (r = Floor@Sqrt[p])^2, p = NextPrime[p]]; AppendTo[a, r], {n, 74}]; a (* Ivan Neretin, May 02 2019 *)
  • PARI
    a(n) = {my(p=2); while(n != p-sqrtint(p)^2, p = nextprime(p+1)); sqrtint(p - n);} \\ Michel Marcus, May 05 2019

Formula

a(n) = sqrt(A056893(n)-n) = A000196(A056893(n)) = sqrt(A056894(n)).

A102821 Numbers n for which the square excess of n-th prime is prime.

Original entry on oeis.org

2, 4, 5, 8, 9, 13, 14, 15, 19, 20, 23, 27, 28, 30, 35, 36, 37, 38, 39, 46, 49, 56, 57, 67, 68, 69, 71, 81, 83, 86, 93, 94, 96, 98, 107, 108, 109, 111, 112, 113, 114, 124, 128, 138, 139, 142, 144, 155, 156, 157, 158, 159, 160, 161, 162, 173, 178, 182, 192, 195, 196, 199
Offset: 0

Views

Author

Olaf Voß, Feb 27 2005

Keywords

Examples

			7 - 2^2 = 3 is the square excess (see A056892) of 7 and it is prime. 7 is the 4th prime, so 4 is in the sequence.
		

Crossrefs

Cf. A056892.

Programs

  • Mathematica
    Select[Range[200],PrimeQ[Prime[#]-Floor[Sqrt[Prime[#]]]^2]&] (* Harvey P. Dale, Jul 06 2014 *)
Showing 1-10 of 18 results. Next