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.

Previous Showing 11-18 of 18 results.

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

A067614 a(n) is the second partial quotient in the simple continued fraction for sqrt(prime(n)).

Original entry on oeis.org

2, 1, 4, 1, 3, 1, 8, 2, 1, 2, 1, 12, 2, 1, 1, 3, 1, 1, 5, 2, 1, 1, 9, 2, 1, 20, 6, 2, 2, 1, 3, 2, 1, 1, 4, 3, 1, 1, 1, 6, 2, 2, 1, 1, 28, 9, 1, 1, 15, 7, 3, 2, 1, 1, 32, 4, 2, 2, 1, 1, 1, 8, 1, 1, 1, 1, 5, 2, 1, 1, 1, 1, 6, 3, 2, 1, 1, 1, 40, 4, 2, 1, 1, 1, 1, 21, 5, 2, 2, 1, 1, 1, 14, 6, 2, 2, 1, 1, 1
Offset: 1

Views

Author

Roger L. Bagula, Feb 01 2002

Keywords

Examples

			For n=8, prime(n)=19, floor(sqrt(19))=4 and 1/(sqrt(19)-4) = 2.786..., so a(8)=2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Floor[1/(Sqrt[Prime[n]]-Floor[Sqrt[Prime[n]]])]
  • PARI
    a(n) = my(r); sqrtint(prime(n),&r)<<1 \ r; \\ Kevin Ryde, May 06 2022

Formula

a(n) = floor(1/(sqrt(prime(n))-floor(sqrt(prime(n))))), where prime(n) is the n-th prime.
a(n) = floor(2*s/r) where s = floor(sqrt(p)) = A000006(n), r = p - s^2 = A056892(n), and p = prime(n). - Kevin Ryde, May 06 2022

Extensions

Edited by Dean Hickerson, Feb 14 2002

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 *)

A104493 Numbers n for which the cube excess of the n-th prime is prime.

Original entry on oeis.org

2, 5, 6, 8, 10, 19, 20, 23, 26, 28, 31, 48, 49, 50, 51, 52, 55, 56, 57, 59, 61, 65, 66, 99, 100, 105, 110, 112, 114, 117, 121, 125, 127, 170, 171, 173, 178, 184, 185, 186, 190, 192, 194, 196, 200, 201, 206, 208, 214, 270, 271, 272, 274, 277, 278, 279, 280, 282
Offset: 1

Views

Author

Jonathan Vos Post, Mar 19 2005

Keywords

Examples

			99 is an element of this sequence because the 99th prime is 523, 523 - 8^3 = 523-512 = 11 and 11 is prime. 100 is in this sequence because the 100th prime is 541 and 541-8^3 = 29, which is prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, p = Prime[n]}, While[k^3 < p, k++ ]; p - (k - 1)^3]; Select[ Range[ 284], PrimeQ[ f[ # ]] &] (* Robert G. Wilson v, Mar 19 2005 *)

Formula

n such that A055400(A000040(n)) is an element of A000040. n such that A104492(n) is prime.

Extensions

More terms from Robert G. Wilson v, Mar 19 2005

A134969 List of pairs of primes that are separated by the equivalent of 2 quadratic intervals. Both primes are greater than their preceding perfect squares by the same amount, or offset. The respective perfect squares can be both odd, in which case the offset is even, or both even, in which case the offset is odd.

Original entry on oeis.org

3, 11, 5, 17, 7, 19, 13, 29, 17, 37, 23, 43, 29, 53, 43, 71, 67, 103, 71, 107, 73, 109, 97, 137
Offset: 1

Views

Author

Michael M. Ross, Feb 04 2008

Keywords

Examples

			Prime pair 71 and 107 have an odd offset of 7 from 64 and 100:
  Interval 1: 8*8 = 64 + 7 = 71.
  Interval 2: 9*9 = 81 + 7 = 88.
  Interval 3: 10*10 = 100 + 7 = 107.
Prime pair 97 and 137 have an even offset of 16 from 81 and 121:
  Interval 1: 9*9 = 81 + 16 = 97.
  Interval 2: 10*10 = 100 + 16 = 116.
  Interval 3: 11*11 = 121 + 16 = 137.
In all cases there is a complete intermediate quadratic interval (#2).
The pair (11,83), 11-9 = 83-81 = 2, does not work because there are 6 squares in between: 16,25,36,49,64,81.
		

Crossrefs

Cf. A056892.

Formula

PS1 + OfN = P1, PS3 + OfN = P2, where
PS1 = first perfect square,
PS3 = 3rd perfect square,
OfN = an equal positive offset from preceding perfect square, and
P1 and P2 = the prime pair.

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
Previous Showing 11-18 of 18 results.