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 10 results.

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

A158037 A106044 sorted and duplicates removed.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78
Offset: 1

Views

Author

Keywords

Comments

All natural numbers except squares, 3^2=9, 4^2=16, 5^2=25, 6^2=36, 7^2=49, 8^2=64, ... are missing from the current sequence.

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];s=p^(1/2);f=Floor[s];a=(f+1)^2;d=a-p;AppendTo[lst,d],{n,7!}];Take[Union[lst],5! ]
    (Floor[Sqrt[#]]+1)^2-#&/@Prime[Range[500]]//Union (* Harvey P. Dale, Aug 02 2021 *)

A176035 Difference between product of two distinct primes and previous perfect square.

Original entry on oeis.org

2, 1, 5, 6, 5, 6, 1, 8, 9, 10, 2, 3, 10, 2, 6, 8, 9, 13, 1, 5, 10, 13, 1, 4, 5, 6, 10, 12, 13, 14, 6, 11, 15, 18, 19, 1, 2, 8, 12, 13, 20, 21, 22, 1, 2, 11, 14, 15, 17, 22, 8, 9, 14, 16, 18, 25, 5, 6, 7, 9, 10, 13, 17, 18, 19, 21, 22, 23, 25, 1, 10, 12, 22, 24, 28, 29, 3, 6, 9, 11, 18, 22, 31
Offset: 1

Views

Author

Keywords

Comments

6-4=2, 10-9=1, 14-9=5, 15-9=6, 21-16=5,..

Crossrefs

Programs

Formula

a(n) = A053186(A006881(n)). - R. J. Mathar, Aug 25 2025

A158038 Difference between n-th prime and next cube.

Original entry on oeis.org

6, 5, 3, 1, 16, 14, 10, 8, 4, 35, 33, 27, 23, 21, 17, 11, 5, 3, 58, 54, 52, 46, 42, 36, 28, 24, 22, 18, 16, 12, 89, 85, 79, 77, 67, 65, 59, 53, 49, 43, 37, 35, 25, 23, 19, 17, 5, 120, 116, 114, 110, 104, 102, 92, 86, 80, 74, 72, 66, 62, 60, 50, 36, 32, 30, 26, 12, 6, 165, 163
Offset: 1

Views

Author

Keywords

Comments

Could be read as a table, since there are always several primes between two cubes. Whenever a(n+1) > a(n), the n-th prime is the largest one below a given cube and prime(n+1) is the smallest prime larger than that cube. For n > 1, these are also the indices where the parity of the terms changes. - M. F. Hasler, Oct 19 2018

Examples

			The first terms are: 8 - 2 = 6, 8 - 3 = 5, 8 - 5 = 3, 8 - 7 = 1, 27 - 11 = 16, ...
From _M. F. Hasler_, Oct 19 2018: (Start)
Starting a new row when going to the next cube, the sequence reads:
  6, 5, 3, 1,                      // = 8 - {primes between 1^3 = 1 and 2^3 = 8}
  16, 14, 10, 8, 4,                // = 27 - {primes between 2^3 = 8 and 3^3 = 27}
  35, 33, 27, 23, 21, 17, 11, 5, 3, // = 64 - {primes between 27 and 4^3 = 64}
  58, 54, 52, ..., 18, 16, 12,     // = 125 - {primes between 64 and 5^3 = 125}
  89, 85, 79, ..., 19, 17, 5,      // = 216 - {primes between 125 and 6^3 = 216}
  120, 116, 114, ..., 26, 12, 6,   // = 343 - {primes between 216 and 7^3 = 343}
  etc. (End)
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];s=p^(1/3);f=Floor[s];a=(f+1)^3;d=a-p;AppendTo[lst,d],{n,6!}];lst
    nc[n_]:=(Floor[Surd[n,3]]+1)^3-n; Table[nc[n],{n,Prime[Range[70]]}] (* Harvey P. Dale, Jun 19 2014 *)
  • PARI
    A158038(n)=(sqrtnint(n=prime(n),3)+1)^3-n \\ M. F. Hasler, Oct 19 2018
    
  • PARI
    first(n) = my(res = vector(n), t = 0, c = 2, c3 = 8); forprime(p = 2, oo, t++; if(p > c3, c++; c3 = c^3); res[t] = c3 - p; if(t==n, return(res))) \\ David A. Corneth, Oct 19 2018

Formula

a(n) > 0. - David A. Corneth, Oct 19 2018

Extensions

Edited by M. F. Hasler, Oct 19 2018

A176034 Difference between product of two distinct primes and next perfect square.

Original entry on oeis.org

3, 6, 2, 1, 4, 3, 10, 3, 2, 1, 11, 10, 3, 13, 9, 7, 6, 2, 16, 12, 7, 4, 18, 15, 14, 13, 9, 7, 6, 5, 15, 10, 6, 3, 2, 22, 21, 15, 11, 10, 3, 2, 1, 24, 23, 14, 11, 10, 8, 3, 19, 18, 13, 11, 9, 2, 24, 23, 22, 20, 19, 16, 12, 11, 10, 8, 7, 6, 4, 30, 21, 19, 9, 7, 3, 2, 30, 27, 24, 22, 15, 11, 2
Offset: 1

Views

Author

Keywords

Comments

9-6=3, 16-10=6, 16-14=2, 16-15=1, 25-21=4,...

Crossrefs

Programs

  • Mathematica
    f1[n_]:=Floor[Sqrt[n]];f2[n_]:=Last/@FactorInteger[n]=={1,1};lst={};Do[If[f2[n],AppendTo[lst,(f1[n]+1)^2-n]],{n,0,6!}];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.

A229067 Sum of n-th prime and next perfect square.

Original entry on oeis.org

6, 7, 14, 16, 27, 29, 42, 44, 48, 65, 67, 86, 90, 92, 96, 117, 123, 125, 148, 152, 154, 160, 183, 189, 197, 222, 224, 228, 230, 234, 271, 275, 281, 283, 318, 320, 326, 332, 336, 369, 375, 377, 387, 389, 422, 424, 436, 448, 483, 485, 489, 495, 497, 507, 546, 552
Offset: 1

Views

Author

Vincenzo Librandi, Sep 25 2013

Keywords

Comments

Primes in the sequence: 7, 29, 67, 197, 271, 281, 283, 389, 617, 631, 641, ...

Crossrefs

Programs

  • Mathematica
    (Floor[Sqrt[#]] + 1)^2 + # &/@Prime[Range[80]]

Formula

a(n) = A000040(n) + A145445(n).

A229497 Product between n-th prime and next perfect square.

Original entry on oeis.org

8, 12, 45, 63, 176, 208, 425, 475, 575, 1044, 1116, 1813, 2009, 2107, 2303, 3392, 3776, 3904, 5427, 5751, 5913, 6399, 8300, 8900, 9700, 12221, 12463, 12947, 13189, 13673, 18288, 18864, 19728, 20016, 25181, 25519, 26533, 27547, 28223, 33908, 35084, 35476, 37436
Offset: 1

Views

Author

Vincenzo Librandi, Sep 25 2013

Keywords

Examples

			63 is in the sequence because 7*9=63.
		

Crossrefs

Programs

  • Mathematica
    (Floor[Sqrt[#]] + 1)^2 # &/@Prime[Range[80]]

Formula

a(n) = A000040(n) * A145445(n).

A320687 Sum of differences of the larger square and primes between two squares.

Original entry on oeis.org

3, 6, 8, 16, 12, 28, 19, 34, 31, 72, 42, 58, 63, 70, 116, 122, 79, 90, 112, 134, 169, 170, 108, 212, 200, 196, 246, 226, 240, 244, 292, 318, 394, 276, 336, 418, 283, 528, 445, 582, 429, 392, 530, 416, 565, 506, 581, 634, 548, 554, 655, 866, 616, 676, 641, 714, 965, 710, 922, 968, 827
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 (listed as A106044): ((n+1)^2 - p1) + ... + ((n+1)^2 - pK).

Examples

			a(1) = 3 = 2 + 1, where {2, 1} = 4 - {2, 3: primes between 1^2 = 1 and 2^2 = 4}.
a(2) = 6 = 4 + 2, with {4, 2} = 9 - {5, 7: primes between 2^2 = 4 and 3^2 = 9}.
a(3) = 8 = sum of {5, 3} = 16 - {11, 13: primes between 3^2 = 9 and 4^2 = 16}.
a(4) = 16 = sum of {8, 6, 2} = 25 - {17, 19, 23: primes between 4^2 and 5^2 = 25}.
a(5) = 12 = sum of {7, 5} = 36 - {29, 31: primes between 5^2 = 25 and 6^2 = 36}.
		

Crossrefs

Equals A014085 * A000290(.+1) - A108314.
Row sums of A106044 read as a table.

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    V:= Vector(N):
    p:= 1;
    do
       p:= nextprime(p);
       n:= floor(sqrt(p));
       if n > N then break fi;
       V[n]:= V[n]+(n+1)^2-p;
    od:
    convert(V,list); # Robert Israel, Jun 17 2019
  • PARI
    a(n,s=0)={forprime(p=n^2,(n+=1)^2,s+=n^2-p);s}

Formula

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

A176036 Absolute values of A176035(n)-A176034(n).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

3-2=1, 6-1=5, 5-2=3, 6-1=5, 5-4=1,..

Crossrefs

Programs

  • Mathematica
    f1[n_]:=Floor[Sqrt[n]];f2[n_]:=Last/@FactorInteger[n]=={1,1};lst={};Do[If[f2[n],AppendTo[lst,Abs[(n-f1[n]^2)-((f1[n]+1)^2-n)]]],{n,0,5!}];lst
Showing 1-10 of 10 results.