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 12 results. Next

A014689 a(n) = prime(n)-n, the number of nonprimes less than prime(n).

Original entry on oeis.org

1, 1, 2, 3, 6, 7, 10, 11, 14, 19, 20, 25, 28, 29, 32, 37, 42, 43, 48, 51, 52, 57, 60, 65, 72, 75, 76, 79, 80, 83, 96, 99, 104, 105, 114, 115, 120, 125, 128, 133, 138, 139, 148, 149, 152, 153, 164, 175, 178, 179, 182, 187, 188, 197, 202, 207, 212, 213, 218, 221, 222
Offset: 1

Views

Author

Keywords

Comments

a(n) = A048864(A000040(n)) = number of nonprimes in RRS of n-th prime. - Labos Elemer, Oct 10 2002
A000040 - A014689 = A000027; in other words, the sequence of natural numbers subtracted from the prime sequence produces A014689. - Enoch Haga, May 25 2009
a(n) = A000040(n) - n. a(n) = inverse (frequency distribution) sequence of A073425(n), i.e., number of terms of sequence A073425(n) less than n. a(n) = A065890(n) + 1, for n >= 1. a(n) - 1 = A065890(n) = the number of composite numbers, i.e., (A002808) less than n-th primes, (i.e., < A000040(n)). - Jaroslav Krizek, Jun 27 2009
a(n) = A162177(n+1) + 1, for n >= 1. a(n) - 1 = A162177(n+1) = the number of composite numbers, i.e., (A002808) less than (n+1)-th number of set {1, primes}, (i.e., < A008578(n+1)). - Jaroslav Krizek, Jun 28 2009
Conjecture: Each residue class contains infinitely many terms of this sequence. Similarly, for any integers m > 0 and r, we have prime(n) + n == r (mod m) for infinitely many positive integers n. - Zhi-Wei Sun, Nov 25 2013
First differences are A046933 = differences minus one between successive primes. - Gus Wiseman, Jan 18 2020

Crossrefs

Equals A014692 - 1.
The sum of prime factors of n is A001414(n).
The sum of prime indices of n is A056239(n).
Their difference is A331415(n).

Programs

Formula

G.f: b(x) - x/((1-x)^2), where b(x) is the g.f. of A000040. - Mario C. Enriquez, Dec 13 2016

Extensions

More terms from Vasiliy Danilov (danilovv(AT)usa.net), Jul 1998
Correction for Aug 2009 change of offset in A158611 and A008578 by Jaroslav Krizek, Jan 27 2010

A073169 a(n)=A002808(n)-n, difference between n-th composite and n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 19 2002

Keywords

Comments

a(n) = the number of numbers of set {1, prime} (A008578(n)) less than n-th composite numbers (A002808(n)). a(n) = inverse (frequency distribution) sequence of A162177(n), i.e. number of terms of sequence A162177(n) less than n for n >= 1. a(n) = A002808(n) + A162177(n) - A158611(n+1) for n >= 1. a(n) = A002808(n) + A162177(n) - A008578(n) for n >= 1. [From Jaroslav Krizek, Jul 23 2009]

Crossrefs

Programs

  • Mathematica
    c[n_Integer] := FixedPoint[n+PrimePi[ # ]+1&, n] Table[c[w]-w, {w, 1, 128}]
    With[{c=Select[Range[100],CompositeQ]},#[[1]]-#[[2]]&/@Thread[ {c,Range[ Length[ c]]}]] (* Harvey P. Dale, Feb 03 2015 *)

Formula

a(n)=1+A073425(n). [From R. J. Mathar, Jul 31 2009]

Extensions

Correction for change of offset in A158611 and A008578 in Aug 2009 Jaroslav Krizek, Jan 27 2010

A073784 Number of primes between successive composite numbers.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0
Offset: 1

Views

Author

Lior Manor, Aug 11 2002

Keywords

Examples

			a(7) = 0 since there are no primes between the 7th and the 8th composites (14 and 15).
		

Crossrefs

a(n) = A073783(n) - 1.
a(n) = A002808(n+1) - A002808(n) - 1.
Also first differences of A073425.

Programs

  • Mathematica
    Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; Table[ PrimePi[Composite[n + 1]] - PrimePi[Composite[n]], {n, 105}] (* Robert G. Wilson v, Dec 20 2004 *)
    Differences[Select[Range[300],CompositeQ]]-1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 01 2021 *)

A104655 Let c(i) = A018252(i) be the i-th nonprime; then the final entry in row n of A101513 is c(a(n)) (see A104656), for n >= 3.

Original entry on oeis.org

4, 8, 11, 17, 22, 30, 37, 46, 55, 66, 77, 90, 103, 117, 132, 148, 166, 183, 201, 222, 242, 264, 287, 310, 334, 360, 387, 413, 442, 470, 500, 533, 564, 598, 631, 665, 701, 738, 775, 813, 853, 893, 936, 979, 1022, 1065, 1110, 1154, 1202, 1251, 1299, 1349, 1401
Offset: 3

Views

Author

N. J. A. Sloane, Apr 22 2005

Keywords

Comments

The entries up to 66 have been checked, but the remaining entries are based on my hypothetical formula (see A101513). (It would be easy to check them.)
I have checked that these are correct entries from the triangle, but not that they match the hypothetical formula (from A101513). - Joshua Zucker, May 20 2006

Crossrefs

Extensions

More terms from Joshua Zucker, May 20 2006

A104656 Final entry in row n of triangle in A101513.

Original entry on oeis.org

1, 3, 8, 14, 18, 26, 33, 44, 52, 64, 76, 90, 104, 120, 135, 153, 171, 190, 213, 234, 255, 282, 304, 330, 358, 386, 414, 446, 478, 510, 542, 575, 611, 651, 688, 726, 766, 804, 847, 892, 933, 978, 1025, 1073, 1124, 1172, 1221, 1270, 1326, 1374, 1426, 1486, 1541
Offset: 1

Views

Author

N. J. A. Sloane, Apr 22 2005

Keywords

Comments

The entries up to 90 have been checked, but the remaining entries are based on my hypothetical formula (see A101513). (It would be easy to check them.)
I have checked that these are correct entries from the triangle, but not that they match the hypothetical formula (from A101513). - Joshua Zucker, May 20 2006

Crossrefs

Extensions

More terms from Joshua Zucker, May 20 2006

A073426 Number of primes between n-th prime and n-th composite or number of primes that are >=Min[prime(n),c(n)] and are < Max[prime(n),c(n)].

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 31 2002

Keywords

Examples

			n=4: in range {p(4)=11 and c(4)=10} 1 prime was found, a(4)=1; n=25: in range {p(25)=97 and c(25)=38} 13 primes, {41,43,..,97} were found, so a(25)=13.
		

Crossrefs

Programs

  • Mathematica
    c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] Table[PrimePi[c[w]]-w+1, {w, 1, 4}] Table[w-PrimePi[c[w]], {w, 5, 128}]

Formula

a(n)=A000720[A000040(n)]-A000720[A002808(n)], for n>=5; a(n)=A000720[A002808(n)]-n+1 for n=1, 2, 3, 4.

A162308 Number of twin primes A001097 smaller than the non-twin prime A007510(n).

Original entry on oeis.org

0, 7, 9, 11, 11, 13, 15, 15, 15, 15, 19, 19, 19, 23, 23, 23, 23, 29, 29, 31, 33, 33, 33, 35, 37, 37, 39, 39, 39, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 45, 45, 45, 45, 47, 47, 47, 47, 47, 47, 47, 49, 49, 49, 49, 51, 51, 51, 53, 53, 55, 57, 57, 59, 59, 59, 59, 59, 59, 59
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 01 2009

Keywords

Examples

			a(2)=7 counts the numbers 3, 5, 7, 11, 13, 17, 19 below 23=A007510(2).
		

Crossrefs

Programs

  • Maple
    isA007510 := proc(n) RETURN(isprime(n) and not isprime(n-2) and not isprime(n+2)) ; end:
    isA001097 := proc(n) RETURN(isprime(n) and (isprime(n-2) or isprime(n+2)) ) ; end:
    A007510 := proc(n) local a; if n = 1 then 2; else for a from procname(n-1)+1 do if isA007510(a) then RETURN(a) ; fi; od: fi; end:
    A162308 := proc(n) local a,k; a := 0 ; for k from 3 to A007510(n)-1 do if isA001097(k) then a := a+1; fi; od; a; end:
    seq(A162308(n),n=1..120) ; # R. J. Mathar, Jul 02 2009

Extensions

Edited by R. J. Mathar, Jul 02 2009

A162309 a(n) is the number of isolated primes up to the smaller component of the n-th twin prime pair.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 6, 10, 10, 13, 13, 17, 17, 17, 19, 20, 23, 24, 26, 29, 39, 39, 43, 50, 54, 57, 59, 60, 62, 80, 80, 80, 82, 84, 101, 101, 102, 102, 104, 110, 119, 122, 123, 124, 125, 133, 136, 138, 138, 153, 154, 158, 159, 160, 167, 174, 174, 178, 178, 182, 185, 189, 189
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 01 2009

Keywords

Comments

Cardinality of the set of terms of A007510 which are smaller than A001359(n).

Examples

			a(1)=1 counts the isolated prime 2, which smaller than 3;
a(2)=1 counts the isolated prime 2, which is smaller than 5;
a(5)=2 counts the isolated primes 2 and 23, which are smaller than 29;
a(6)=3 counts 2, 23 and 37, which are smaller than 41.
		

Crossrefs

Programs

  • Maple
    read("transforms3") ; tp := BFILETOLIST("b001359.txt") ;
    A162309 := proc(n) global tp; a := 0 ; for j from 2 to op(n,tp)-1 do if isprime(j) then if ( j in tp ) or (j-2) in tp then ; else a :=a +1; fi; fi; od: a ; end:
    seq(A162309(n),n=1..130 ); # R. J. Mathar, Aug 29 2009
  • Mathematica
    A027833 =
    Differences[Flatten[Position[Differences[Prime[Range[500]]], 2]]];
    ReplacePart[Accumulate[Join[{2}, A027833 - 2]], 1 -> 1]
    (* Jean-François Alcover, Jan 23 2023, after Harvey P. Dale in A027833 *)

Formula

a(n+1) - a(n) = A027833(n) - 2, n > 1. [R. J. Mathar, Aug 29 2009]

Extensions

53 replaced with 54, 100 removed twice, etc., by R. J. Mathar, Aug 29 2009

A173073 (n-th nonnegative nonprime) minus (n-1).

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Feb 09 2010

Keywords

Comments

Zero together with (natural nonprimes minus n).

Crossrefs

Formula

a(n)=A141468(n)-A001477(n-1). [corrected R. J. Mathar, Apr 25 2010]

Extensions

Formula index corrected by R. J. Mathar, Apr 24 2010

A161569 Sum of first n nonprimes minus their indices.

Original entry on oeis.org

0, 2, 5, 9, 13, 17, 22, 28, 34, 40, 47, 55, 63, 71, 80, 89, 98, 107, 116, 126, 137, 148, 159, 170, 181, 193, 205, 217, 230, 244, 258, 272, 287, 302, 317, 332, 347, 363, 379, 395, 411, 427, 444, 462, 480, 498, 516, 534, 553, 572, 591, 611, 632, 653, 674, 695, 716
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 14 2009

Keywords

Comments

The sum of first n nonprimes is in A051349.
Partial sums of A073425. - Jaroslav Krizek, Jun 27 2009

Examples

			a(1) = 1-1 = 0; a(2) = 0+4-2 = 2, a(3) = 2+6-3 = 5; a(4) = 5+8-4 = 9.
		

Crossrefs

Formula

a(n) = A051349(n)-n*(n+1)/2.
a(n) = a(n-1)+A018252(n)-n, a(1) = 0. - Klaus Brockhaus, Dec 16 2010

Extensions

a(54)-a(57) from Stefano Spezia, May 26 2025
Showing 1-10 of 12 results. Next