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

A076272 Largest prime factor of A076271(n): A006530(A076271(n)).

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 29, 29, 31, 31, 31, 31, 31, 31, 31, 31, 37, 37, 37, 37, 37, 37, 37, 37
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 04 2002

Keywords

Crossrefs

See A180101 for a variant.

Programs

  • Mathematica
    Differences[NestList[#+FactorInteger[#][[-1,1]]&,1,100]] (* Paolo Xausa, Dec 09 2023 *)

Formula

a(n) = A076271(n+1) - A076271(n) for all n;
a(A076273(k)+j) = A008578(k) for k>0 and 0 <= j < A075527(k-1).

A075527 a(n) = A008578(n+3) - A008578(n+1).

Original entry on oeis.org

2, 3, 4, 6, 6, 6, 6, 6, 10, 8, 8, 10, 6, 6, 10, 12, 8, 8, 10, 6, 8, 10, 10, 14, 12, 6, 6, 6, 6, 18, 18, 10, 8, 12, 12, 8, 12, 10, 10, 12, 8, 12, 12, 6, 6, 14, 24, 16, 6, 6, 10, 8, 12, 16, 12, 12, 8, 8, 10, 6, 12, 24, 18, 6, 6, 18, 20, 16, 12, 6, 10, 14, 14, 12, 10, 10, 14, 12, 12, 18, 12
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 22 2002

Keywords

Comments

For n>0: a(n) = A031131(n) and a(n) - a(n-1) = A075526(n).

Crossrefs

Extensions

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

A164653 a(1) = 1, for n>=2: a(n) = sum of two consecutive noncomposite numbers A008578.

Original entry on oeis.org

1, 3, 5, 8, 12, 18, 24, 30, 36, 42, 52, 60, 68, 78, 84, 90, 100, 112, 120, 128, 138, 144, 152, 162, 172, 186, 198, 204, 210, 216, 222, 240, 258, 268, 276, 288, 300, 308, 320, 330, 340, 352, 360, 372, 384, 390, 396, 410, 434, 450, 456, 462, 472, 480, 492, 508
Offset: 1

Views

Author

Jaroslav Krizek, Aug 19 2009

Keywords

Comments

Basically these are the sums of two successive primes. - N. J. A. Sloane, Nov 16 2018
Essentially the same as A001043, A011974 and A069102.

Crossrefs

Programs

  • Mathematica
    ListConvolve[{1,1},Join[{0,1},Prime[Range[100]]]] (* Paolo Xausa, Nov 02 2023 *)

Formula

a(n) = A158611(n) + A158611(n+1).
a(n) = A008578(n-1) + A008578(n) for n >= 2.
a(n) = A076273(n-1) + 1 for n >= 2.
a(n) = A000040(n-1) + A008578(n-1) for n >= 2. - Jaroslav Krizek, Dec 13 2009

Extensions

Edited by R. J. Mathar, Aug 21 2009
Correction for change of offset in A158611 and A008578 in Aug 2009 by Jaroslav Krizek, Jan 27 2010
Formulas edited by Paolo Xausa, Nov 04 2023

A226534 a(n) = (p(n+1) + p(n) - 1) mod (p(n+1) - p(n) + 1) where p(n) is the n-th prime.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Aug 31 2013

Keywords

Programs

  • Mathematica
    Table[Mod[Prime[p + 1] + Prime[p] - 1, Prime[p + 1] - Prime[p] + 1], {p, 100}] (* Alonso del Arte, Jan 18 2014 *)
    Mod[Total[#]-1,#[[2]]-#[[1]]+1]&/@Partition[Prime[Range[100]],2,1] (* Harvey P. Dale, Mar 16 2023 *)
  • PARI
    a(n)=lift(Mod(prime(n+1)+prime(n)-1,prime(n+1)-prime(n)+1)) /* Ralf Stephan, Sep 03 2013 */

Formula

a(n) = A076273(n+1) mod A076368(n+1).

A366274 a(n) is the least k such that prime(n+1+k) >= prime(n)+prime(n+1).

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 4, 5, 6, 7, 8, 9, 10, 10, 10, 13, 13, 13, 14, 14, 15, 15, 16, 18, 20, 20, 19, 19, 18, 22, 24, 24, 25, 27, 27, 27, 29, 28, 29, 30, 31, 31, 33, 33, 32, 34, 37, 39, 38, 39, 40, 40, 41, 42, 42, 43, 42, 43, 43, 43
Offset: 1

Views

Author

Patrick Butler, Oct 05 2023

Keywords

Comments

a(n) is the number of primes between prime(n) and prime(n) + prime(n+1).
Conjecture: for n >= 3, a(n) < n.

Examples

			For n = 5 prime(n) = 11. prime(5) + prime(6) = 11+13=24.  The 4th prime after 13 is 29 which is the next prime after 13 greater than or equal to 24. So a(5) = 4.
		

Crossrefs

Programs

  • Maple
    R:= 1: pn:= 2: pn1:= 3: p:=5: m:= 4: pp:= 7:
    for n from 2 to 100 do
      pn:= pn1; pn1:= nextprime(pn1);
      while pp <= pn + pn1 do m:= m+1; pp:= nextprime(pp); od;
      R:= R, m-n-1;
    od:
    R; # Robert Israel, Oct 31 2023
  • Mathematica
    A366274[n_]:=PrimePi[Prime[n]+Prime[n+1]-1]-n;Array[A366274,100] (* Paolo Xausa, Dec 09 2023 *)
  • PARI
    a(n) = my(k=1, q=prime(n)+prime(n+1)); while(prime(n+k) < q, k++); k; \\ Michel Marcus, Oct 06 2023
  • Python
    m=0
    #list here is a list of prime numbers A000040.
    def a(n):
        global list
        sum= list[n]+list[n+1]
        i=n+2
        while True:
            if(list[i]>=sum):
                m=i
                break
            i=i+1
        k = m-(n+1)
        return k
    #
    #calculate the terms of the sequence a(n).
    seq = []
    for n in range(0,firstN):
       seq.append(a(n))
    

Formula

a(n) = A000720(A001043(n)-1)-n = A000720(A076273(n+1))-n. - Paolo Xausa, Dec 09 2023
Showing 1-5 of 5 results.