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-2 of 2 results.

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

A073170 a(1) = a(2) = 0; for n>2, a(n) = prime(n-1)-n+1.

Original entry on oeis.org

0, 0, 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
Offset: 1

Views

Author

Labos Elemer, Jul 19 2002

Keywords

Comments

Smallest x such that A002808(x)-x (cf. A073169) equals n, or 0 if no such value exists.

Crossrefs

Cf. A002808, A073168, A073169. Essentially same sequence as A014689.

Programs

  • Mathematica
    f[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] t=Table[0, {100}]; Do[s=f[n]-n; If[s<101&&t[[s]]==0, t[[s]]=n], {n, 1, 10000}]; t
    Join[{0,0},Table[Prime[n-1]-n+1,{n,3,70}]] (* Harvey P. Dale, Dec 18 2012 *)

Formula

a(n)=Min{x; composite[x]-x=n}

Extensions

Simpler description from Vladeta Jovovic, Mar 29 2003
Definition corrected by Harvey P. Dale, Dec 18 2012
Showing 1-2 of 2 results.