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-20 of 174 results. Next

A346653 Numbers p that are the first of three consecutive primes p,q,r such that p*q*r-(p+q+r) and p*q*r+(p+q+r) are both in A001043.

Original entry on oeis.org

3, 1579, 3967, 14323, 30763, 32189, 41389, 61471, 70117, 74051, 74707, 79691, 95239, 154157, 157181, 157433, 169003, 184321, 215063, 237563, 265271, 300877, 303217, 320741, 326119, 366713, 382241, 392531, 408689, 544723, 572749, 584099, 587219, 615103, 639487, 653561, 674231, 687151, 698483
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jul 26 2021

Keywords

Comments

Numbers p that are the first of three consecutive primes p,q,r such that p*q*r-(p+q+r) is the sum of two consecutive primes and p*q*r+(p+q+r) is the sum of two consecutive primes.

Examples

			a(3) = 3967 is a term because 3967, 3989, 4001 are consecutive primes with
3967*3989*4001-(3967+3989+4001) = 63313264406 = 31656632197+31656632209,
3967*3989*4001+(3967+3989+4001) = 63313288320 = 31656644153+31656644167,
31656632197 and 31656632209 are consecutive primes
and 31656644153 and 31656644167 are consecutive primes.
		

Crossrefs

Cf. A001043.

Programs

  • Maple
    q:= 2: r:= 3:
    R:= NULL: count:= 0:
    while count < 40 do
      p:= q; q:= r; r:= nextprime(r);
      s:= p+q+r;
      v:= p*q*r+s;
      t:= prevprime(v/2);
      if nextprime(t)+t <> v then next fi;
      v:= v-2*s;
      t:= prevprime(v/2);
      if nextprime(t)+t = v then
        count:= count+1;
        R:= R, p;
      fi
    od:
    R;

A372263 Least odd prime factor of the n-th sum of two consecutive primes, A001043(n) = prime(n) + prime(n+1), or 2 if there is no odd prime factor.

Original entry on oeis.org

5, 2, 3, 3, 3, 3, 3, 3, 13, 3, 17, 3, 3, 3, 5, 7, 3, 2, 3, 3, 19, 3, 43, 3, 3, 3, 3, 3, 3, 3, 3, 67, 3, 3, 3, 7, 5, 3, 5, 11, 3, 3, 3, 3, 3, 5, 7, 3, 3, 3, 59, 3, 3, 127, 5, 7, 3, 137, 3, 3, 3, 3, 3, 3, 3, 3, 167, 3, 3, 3, 89, 3, 5, 47, 3, 193, 3, 3, 3, 3, 3, 3, 3, 109, 3, 223
Offset: 1

Views

Author

M. F. Hasler, Apr 24 2024

Keywords

Comments

Since the sum of any two primes > 2 is even, we rather consider odd prime factors.
Can it be proved or disproved that there are primes that occur only finitely many times (or never) in this sequence? If so, which is the smallest such prime?
From Robert Israel, Dec 29 2024: (Start)
Dickson's conjecture implies that every odd prime occurs infinitely many times in the sequence.
a(n) = 2 if and only if n = A000720(2^k) where k is in A226178. (End)

Examples

			Sums of two consecutive primes are given as s(n) = A001043(n). The least odd prime factor (or 2 if there's no odd prime factor) of these terms is a(n):
n = 1, 2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,  15,  16,  17,  18, ...
s = 5, 8, 12, 18, 24, 30, 36, 42, 52, 60, 68, 78, 84, 90, 100, 112, 120, 128, ...
a = 5, 2,  3,  3,  3,  3,  3,  3, 13,  3, 17,  3,  3,  3,   5,   7,   3,   2, ...
Also, a(21) = spf(152) = 19; a(23) = spf(172) = 43; a(32) = spf(268) = 67, ...
		

Crossrefs

Cf. A001043 (sums of two consecutive primes), A078701 (least odd prime divisor), A020639 (spf: least prime factor), A000265 (odd part of n), A000079 (powers of 2).
Cf. A024677 (spf of A024675(n) = A001043(n)/2).
Cf. A226178.

Programs

  • Maple
    f:= proc(n) subs(infinity=2,min(numtheory:-factorset(ithprime(n)+ithprime(n+1)) minus {2})) end proc:
    map(f, [$1..100]); # Robert Israel, Dec 29 2024
  • PARI
    apply( {a(n) = max(A078701(A001043(n)), 2)}, [1..99])
    /* a "self-contained" but less efficient definition:
    a(n) = factor(max((n=prime(n)+prime(n+1))>>valuation(n,2),2))[1,1] */

Formula

a(n) = max(A078701(A001043(n)), 2) = A020639(max(A000265(A001043(n)), 2)), where A000265(m) > 2 unless m is in A000079.

A008472 Sum of the distinct primes dividing n.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, 13, 9, 8, 2, 17, 5, 19, 7, 10, 13, 23, 5, 5, 15, 3, 9, 29, 10, 31, 2, 14, 19, 12, 5, 37, 21, 16, 7, 41, 12, 43, 13, 8, 25, 47, 5, 7, 7, 20, 15, 53, 5, 16, 9, 22, 31, 59, 10, 61, 33, 10, 2, 18, 16, 67, 19, 26, 14, 71, 5, 73
Offset: 1

Views

Author

Keywords

Comments

Sometimes called sopf(n).
Sum of primes dividing n (without repetition) (compare A001414).
Equals A051731 * A061397 = inverse Mobius transform of [0, 2, 3, 0, 5, 0, 7, ...]. - Gary W. Adamson, Feb 14 2008
Equals row sums of triangle A143535. - Gary W. Adamson, Aug 23 2008
a(n) = n if and only if n is prime. - Daniel Forgues, Mar 24 2009
a(n) = n is a new record if and only if n is prime. - Zak Seidov, Jun 27 2009
a(A001043(n)) = A191583(n);
For n > 0: a(A000079(n)) = 2, a(A000244(n)) = 3, a(A000351(n)) = 5, a(A000420(n)) = 7;
a(A006899(n)) <= 3; a(A003586(n)) = 5; a(A033846(n)) = 7; a(A033849(n)) = 8; a(A033847(n)) = 9; a(A033850(n)) = 10; a(A143207(n)) = 10. - Reinhard Zumkeller, Jun 28 2011
For n > 1: a(n) = Sum(A027748(n,k): 1 <= k <= A001221(n)). - Reinhard Zumkeller, Aug 27 2011
If n is the product of twin primes (A037074), a(n) = 2*sqrt(n+1) = sqrt(4n+4). - Wesley Ivan Hurt, Sep 07 2013
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) + 2, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing mappings on a set with n elements.
a(n) + 3, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing partial mappings on a set with n elements.
(End)
The smallest m such that a(m) = n, or 0 if no such number m exists is A064502(n). The only integers that are not in the sequence are 1, 4 and 6. - Bernard Schott, Feb 07 2022

Examples

			a(18) = 5 because 18 = 2 * 3^2 and 2 + 3 = 5.
a(19) = 19 because 19 is prime.
a(20) = 7 because 20 = 2^2 * 5 and 2 + 5 = 7.
		

Crossrefs

First difference of A024924.
Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), this sequence (k=1), A005063 (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), this sequence (k=8), A351197 (k=9), A351198 (k=10).
Cf. A010051.

Programs

  • Haskell
    a008472 = sum . a027748_row  -- Reinhard Zumkeller, Mar 29 2012
    
  • Magma
    [n eq 1 select 0 else &+[p[1]: p in Factorization(n)]: n in [1..100]]; // Vincenzo Librandi, Jun 24 2017
    
  • Maple
    A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))):
    seq(A008472(i), i = 1..40); # Peter Luschny, Jan 31 2012
    A008472 := proc(n)
            add( d, d= numtheory[factorset](n)) ;
    end proc: # R. J. Mathar, Jul 08 2012
  • Mathematica
    Prepend[Array[Plus @@ First[Transpose[FactorInteger[#]]] &, 100, 2], 0]
    Join[{0}, Rest[Total[Transpose[FactorInteger[#]][[1]]]&/@Range[100]]] (* Harvey P. Dale, Jun 18 2012 *)
    (* Requires version 7.0+ *) Table[DivisorSum[n, # &, PrimeQ[#] &], {n, 75}] (* Alonso del Arte, Dec 13 2014 *)
    Table[Sum[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    sopf(n) = local(fac=factor(n)); sum(i=1,matsize(fac)[1],fac[i,1])
    
  • PARI
    vector(100,n,vecsum(factor(n)[,1]~)) \\ Derek Orr, May 13 2015
    
  • PARI
    A008472(n)=vecsum(factor(n)[,1]) \\ M. F. Hasler, Jul 18 2015
    
  • Python
    from sympy import primefactors
    def A008472(n): return sum(primefactors(n)) # Chai Wah Wu, Feb 03 2022
  • Sage
    def A008472(n):
        return add(d for d in divisors(n) if is_prime(d))
    print([A008472(i) for i in (1..40)]) # Peter Luschny, Jan 31 2012
    
  • Sage
    [sum(prime_factors(n)) for n in range(1,74)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

Let n = Product_j prime(j)^k(j) where k(j) >= 1, then a(n) = Sum_j prime(j).
Additive with a(p^e) = p.
G.f.: Sum_{k >= 1} prime(k)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 06 2017
Dirichlet g.f.: primezeta(s-1)*zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n, p prime} p. - Wesley Ivan Hurt, Feb 04 2022
From Bernard Schott, Feb 07 2022: (Start)
For n > 0: a(A001020(n)) = 11, a(A001022(n)) = 13, a(A001026(n)) = 17, a(A001029(n)) = 19, a(A009967(n)) = 23, a(A009973(n)) = 29, a(A009975(n)) = 31, a(A009981(n)) = 37, a(A009985(n)) = 41, a(A009987(n)) = 43, a(A009991(n)) = 47.
For p odd prime, a(2*p) = p+2 <==> a(A100484(n)) = A052147(n) for n > 1. (End)
a(n) = Sum_{d|n} d * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 22 2024

A024675 Average of two consecutive odd primes.

Original entry on oeis.org

4, 6, 9, 12, 15, 18, 21, 26, 30, 34, 39, 42, 45, 50, 56, 60, 64, 69, 72, 76, 81, 86, 93, 99, 102, 105, 108, 111, 120, 129, 134, 138, 144, 150, 154, 160, 165, 170, 176, 180, 186, 192, 195, 198, 205, 217, 225, 228, 231, 236, 240, 246, 254, 260, 266, 270, 274, 279, 282, 288, 300
Offset: 1

Views

Author

Keywords

Comments

Sometimes called interprimes.
Where local maxima of A072681 occur: A072681(a(n))=A074927(n+1). - Reinhard Zumkeller, Mar 04 2009
Never prime, for that would contradict the definition. - Jon Perry, Dec 05 2012
A subset of A145025, obtained from that sequence by omitting the primes (which are barycenter of their neighboring primes). - M. F. Hasler, Jun 01 2013
Conjecture: Product_{k=1..n} a(k)/A028334(k+1) is an integer for every natural n. Cf. A352743. - Thomas Ordowski, Mar 31 2022
In contrast to the arithmetic mean, the geometric and the harmonic mean of two consecutive primes is never an integer. What is the first case where either of the two would differ from the arithmetic mean, i.e., this sequence? The existence of such a pair of primes is related to Legendre's conjecture, cf. link to discussion on the math-fun mailing list. - M. F. Hasler, Apr 07 2025

Crossrefs

Cf. A072568, A072569. Bisections give A058296, A079424.
Cf. A373699 (partial sums).

Programs

  • Maple
    seq( ( (ithprime(x)+ithprime(x+1))/2 ),x=2..40);
  • Mathematica
    Plus @@@ Partition[Table[Prime[n], {n, 2, 100}], 2, 1]/2
    ListConvolve[{1, 1}/2, Prime /@ Range[2, 70]] (* Jean-François Alcover, Jun 25 2013 *)
    Mean/@Partition[Prime[Range[2,70]],2,1] (* Harvey P. Dale, Jul 28 2020 *)
  • PARI
    for(X=2,50,print((prime(X)+prime(X+1))/2)) \\ Hauke Worpel (thebigh(AT)outgun.com), May 08 2008
    
  • PARI
    first(n)=my(v=primes(n+2)); vector(n,i,v[i+1]+v[i+2])/2 \\ Charles R Greathouse IV, Jun 25 2013
    
  • Python
    from sympy import prime
    def a(n): return (prime(n + 1) + prime(n + 2)) // 2
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 11 2017

Formula

a(n) = (prime(n+1)+prime(n+2))/2 = A001043(n+1)/2. - Omar E. Pol, Feb 02 2012
Conjecture: a(n) = ceiling(sqrt(prime(n+1)*prime(n+2))). - Thomas Ordowski, Mar 22 2013 [This requires gaps to be smaller than approximately sqrt(8p) and hence requires a result on prime gaps slightly stronger than that provided by the Riemann hypothesis. - Charles R Greathouse IV, Jul 13 2022]
Equals A145025 \ A006562 = A145025 \ A000040. - M. F. Hasler, Jun 01 2013

A034961 Sums of three consecutive primes.

Original entry on oeis.org

10, 15, 23, 31, 41, 49, 59, 71, 83, 97, 109, 121, 131, 143, 159, 173, 187, 199, 211, 223, 235, 251, 269, 287, 301, 311, 319, 329, 349, 371, 395, 407, 425, 439, 457, 471, 487, 503, 519, 533, 551, 565, 581, 589, 607, 633, 661, 679, 689, 701, 713, 731, 749, 771
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

For prime terms see A034962. - Zak Seidov, Feb 17 2011

Examples

			a(1) = 10 = 2 + 3 + 5.
a(42) = 565 = 181 + 191 + 193.
		

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..2] ]: n in [1..50] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Mathematica
    Plus @@@ Partition[ Prime[ Range[60]], 3, 1] (* Robert G. Wilson v, Feb 11 2005 *)
    3 MovingAverage[Prime[Range[60]], {1, 1, 1}] (* Jean-François Alcover, Nov 12 2018 *)
  • PARI
    a(n)=my(p=prime(n),q=nextprime(p+1)); p+q+nextprime(q+1) \\ Charles R Greathouse IV, Jul 01 2013
    
  • PARI
    is(n)=my(p=precprime(n\3),q=nextprime(n\3+1),r=n-p-q); if(r>q, r==nextprime(q+2), r==precprime(p-1) && r) \\ Charles R Greathouse IV, Jul 05 2017
    
  • Python
    from sympy import nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        p, q, r = 2, 3, 5
        while True:
            yield p + q + r
            p, q, r = q, r, nextprime(r)
    print(list(islice(agen(), 54))) # Michael S. Branicky, Dec 27 2022
  • Sage
    BB = primes_first_n(57)
    L = []
    for i in range(55):
        L.append(BB[i]+BB[i+1]+BB[i+2])
    L # Zerinvary Lajos, May 14 2007
    

Formula

a(n) = Sum_{k=0..2} A000040(n+k). - Omar E. Pol, Feb 28 2020
a(n) = A001043(n) + A000040(n+2). - R. J. Mathar, May 25 2020

A034963 Sums of four consecutive primes.

Original entry on oeis.org

17, 26, 36, 48, 60, 72, 88, 102, 120, 138, 152, 168, 184, 202, 220, 240, 258, 272, 290, 306, 324, 348, 370, 390, 408, 420, 432, 456, 480, 508, 534, 556, 576, 596, 620, 638, 660, 682, 700, 724, 744, 762, 780, 800, 830, 860, 890, 912, 928, 942, 964, 988, 1012
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Examples

			a(7) = 17 + 19 + 23 + 29 = 88.
		

Crossrefs

Programs

Formula

a(n) = Sum_{k=0..3} A000040(n+k). - Omar E. Pol, Mar 02 2020

A031131 Difference between n-th prime and (n+2)-nd prime.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Distance between the pair of primes adjacent to the (n+1)-st prime. - Lekraj Beedassy, Oct 01 2004 [Typo corrected by Zak Seidov, Feb 22 2009]
A031131(A261525(n)) = 2*n and A031131(m) != 2*n for m < A261525(n). - Reinhard Zumkeller, Aug 23 2015
The Polymath project 8b proved that a(n) <= 395106 infinitely often (their published paper contains the slightly weaker bound a(n) <= 398130 infinitely often). - Charles R Greathouse IV, Jul 22 2016

Examples

			a(10)=8 because the 10th prime=29 is followed by primes 31 and 37, and 37 - 29 = 8.
		

Crossrefs

Sum of consecutive terms of A001223.
Cf. A075527 (allowing 1 to be prime).
First differences of A001043.

Programs

  • Haskell
    a031131 n = a031131_list !! (n-1)
    a031131_list = zipWith (-) (drop 2 a000040_list) a000040_list
    -- Reinhard Zumkeller, Dec 19 2013
  • Magma
    [NthPrime(n+2)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 11 2011
    
  • Maple
    P:= select(isprime, [2,seq(2*i+1,i=1..1000)]):
    P[3..-1] - P[1..-3]; # Robert Israel, Jan 25 2015
  • Mathematica
    Differences[lst_]:=Drop[lst,2]-Drop[lst,-2]; Differences[Prime[Range[123]]] (* Vladimir Joseph Stephan Orlovsky, Aug 13 2009 *)
    Map[#3 - #1 & @@ # &, Partition[Prime@ Range[84], 3, 1]] (* Michael De Vlieger, Dec 17 2017 *)
  • MuPAD
    ithprime(i+2)-ithprime(i) $ i = 1..65 // Zerinvary Lajos, Feb 26 2007
    
  • PARI
    a(n)=my(p=prime(n));nextprime(nextprime(p+1)+1)-p \\ Charles R Greathouse IV, Jul 01 2013
    
  • Sage
    BB = primes_first_n(67)
    L = []
    for i in range(65):
        L.append(BB[2+i]-BB[i])
    L
    # Zerinvary Lajos, May 14 2007
    

Formula

a(n) = A001223(n) + A001223(n-1). - Lior Manor, Jan 19 2005
a(n) = A000040(n+2) - A000040(n).
a(n) = 2*A052288(n-1) for n>1. - Hugo Pfoertner, Apr 16 2025

Extensions

Corrected by T. D. Noe, Sep 11 2008
Edited by N. J. A. Sloane, Sep 18 2008, at the suggestion of T. D. Noe

A034962 Primes that are the sum of three consecutive primes.

Original entry on oeis.org

23, 31, 41, 59, 71, 83, 97, 109, 131, 173, 199, 211, 223, 251, 269, 311, 349, 439, 457, 487, 503, 607, 661, 701, 829, 857, 883, 911, 941, 1033, 1049, 1061, 1151, 1187, 1229, 1249, 1303, 1367, 1381, 1409, 1433, 1493, 1511, 1553, 1667, 1867, 1931, 1973, 1993
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

Or, primes in A034961 (Sums of three consecutive primes). - Zak Seidov, Feb 16 2011

Examples

			E.g., 131 = 41 + 43 + 47.
A034962(n) = p+q+r, where p = A073681(n), and p<q<r are three consecutive primes. - _Zak Seidov_, Mar 09 2009
		

Crossrefs

Cf. A001043, A011974, A034707, A034961. Different from A050207.
Cf. A073681 (smallest of three consecutive primes whose sum is a prime).

Programs

  • Magma
    [a: n in [1..150] | IsPrime(a) where a is NthPrime(n)+NthPrime(n+1)+NthPrime(n+2)]; // Vincenzo Librandi, Jun 23 2016
    
  • Maple
    a:=proc(n) if isprime(ithprime(n)+ithprime(n+1)+ithprime(n+2))=true then ithprime(n)+ithprime(n+1)+ithprime(n+2) else fi end: seq(a(n), n=1..120); # Emeric Deutsch, Apr 24 2006
  • Mathematica
    a = {}; Do[k = Prime[x] + Prime[x + 1] + Prime[x + 2]; If[PrimeQ[k], AppendTo[a, k]], {x, 1, 350}]; a (* Artur Jasinski, Jan 27 2007 *)
    Select[(Plus@@@Partition[Prime[Range[200]],3,1]),PrimeQ] (* Zak Seidov, Feb 07 2012 *)
    Select[ListConvolve[{1,1,1},Prime[Range[200]]],PrimeQ] (* Harvey P. Dale, Jul 12 2013 *)
  • PARI
    forprime(p=2,1000, p2=nextprime(p+1); p3=nextprime(p2+1); q=p+p2+p3; if(isprime(q),print1(q",")) ) \\ Max Alekseyev, Jan 26 2007
    
  • PARI
    {p=2;q=3;for(n=1,100,r=nextprime(q+1); if(isprime(t=p+q+r),print1(t","));p=q;q=r;)} \\ Zak Seidov, Mar 09 2009
    
  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        p, q, r = 2, 3, 5
        while True:
            if isprime(p+q+r): yield p+q+r
            p, q, r = q, r, nextprime(r)
    print(list(islice(agen(), 50))) # Michael S. Branicky, Dec 27 2022

A001747 2 together with primes multiplied by 2.

Original entry on oeis.org

2, 4, 6, 10, 14, 22, 26, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218, 226, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482, 502
Offset: 1

Views

Author

Keywords

Comments

When supplemented with 8, may be considered the "even primes", since these are the even numbers n = 2k which are divisible just by 1, 2, k and 2k. - Louis Zuckerman (louis(AT)trapezoid.com), Sep 12 2000
Sequence gives solutions of sigma(n) - phi(n) = n + tau(n) where tau(n) is the number of divisors of n.
Numbers n such that sigma(n) = 3*(n - phi(n)).
Except for 2, orders of non-cyclic groups k (in A060679(n)) such that x^k==1 (mod k) has only 1 solution 2<=x<=k. - Benoit Cloitre, May 10 2002
Numbers n such that A092673(n) = 2. - Jon Perry, Mar 02 2004
Except for initial terms, this sequence = A073582 = A074845 = A077017. Starting with the term 10, they are identical. - Robert G. Wilson v, Jun 15 2004
Together with 8 and 16, even numbers n such that n^2 does not divide (n/2)!. - Arkadiusz Wesolowski, Jul 16 2011
Twice noncomposite numbers. - Omar E. Pol, Jan 30 2012

Crossrefs

Equals {2} UNION {A100484}.

Programs

  • GAP
    Concatenation([2], List([1..60], n-> 2*Primes[n])); # G. C. Greubel, May 18 2019
  • Magma
    [2] cat [2*NthPrime(n): n in [1..60]]; // G. C. Greubel, May 18 2019
    
  • Mathematica
    Join[{2},2*Prime[Range[60]]] (* Harvey P. Dale, Jul 23 2013 *)
  • PARI
    print1(2);forprime(p=2,97,print1(", "2*p)) \\ Charles R Greathouse IV, Jan 31 2012
    
  • Sage
    [2]+[2*nth_prime(n) for n in (1..60)] # G. C. Greubel, May 18 2019
    

Formula

a(n) = A001043(n) - A001223(n+1), except for initial term.
a(n) = A116366(n-2,n-2) for n>2. - Reinhard Zumkeller, Feb 06 2006
A006093(n) = A143201(a(n+1)) for n>1. - Reinhard Zumkeller, Aug 12 2008
a(n) = 2*A008578(n). - Omar E. Pol, Jan 30 2012, and Reinhard Zumkeller, Feb 16 2012

A069482 a(n) = prime(n+1)^2 - prime(n)^2.

Original entry on oeis.org

5, 16, 24, 72, 48, 120, 72, 168, 312, 120, 408, 312, 168, 360, 600, 672, 240, 768, 552, 288, 912, 648, 1032, 1488, 792, 408, 840, 432, 888, 3360, 1032, 1608, 552, 2880, 600, 1848, 1920, 1320, 2040, 2112, 720, 3720, 768, 1560, 792, 4920, 5208, 1800, 912, 1848
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 29 2002, Aug 05 2007

Keywords

Comments

a(n) = A001248(n+1) - A001248(n) = A000040(n+1)^2 - A000040(n)^2 = (A000040(n+1) - A000040(n))*(A000040(n+1) + A000040(n)) = A001223(n)*A001043(n); together with A069484(n) and A069486(n) a Pythagorean triangle is formed with area = A069487(n).
For n>2: A078701(a(n)) = 3.
Except for the first two terms, these numbers are divisible by 24. Let p, q be consecutive primes. Then p > 3 = 3k+-1 and q = 3m+-1 and (3k+-1)^2 - (3m+-1)^2 is divisible by 3. Similarly, p = 4k+-1 and q=4m+-1 and (4k+-1)^2 - (4m+-1)^2 is divisible by 8. So 8 and 3 divide q^2 - p^2 => 24 divides q^2 - p^2. - Cino Hilliard, May 28 2009
Repetition of a(n) values occurs with decreasing frequency but increasing tallies (i.e., number of repetitions of a given value).
Tally = 2, first a(n) value is 72, with first n=4, prime=7.
Tally = 3, first a(n) value is 1848, with first n=36, prime=151.
Tally = 4, first a(n) value is 4920, with first n=46, prime=199.
Tally = 5, first a(n) value is 187117320, with first n=224752, prime 3118607.
Three a(n) values have a tally = 5, and none with tally > 5 for n<10,000,000. Note: Tallies for a given a(n) value are "confirmed" (i.e., not to be greater) only after examining a(n) values for all p(n) <= r/4-1, where r is the a(n) value in question, because twin primes provide the last chance for adding to the tally of any a(n) value. Tallies for the four a(n) values above are "confirmed" and all of them rely on twin primes for their last repetition. Thus r/4 +-1 is prime for the above four cases. However this is not true for all a(n) values that repeat.
Conjecture: The sum of prime factors with repetition (sopfr) applied to a(n), A001414(a(n)), covers all integers covered by sopfr, except 2,3,4,6,7,10,13,15. See A001414 for the sopfr sequence, which does not cover 0 and 1. - Richard R. Forberg, Feb 07 2015
Conjecture: There is no upper bound on the number of repetitions (i.e., size of a tally) that will occur for some a(n) values, because the number of possible ways of producing a value of a(n) grows with increasing n, despite decreasing prime density. This happens because there is increasing range in the size of prime gaps which increases the range of primes that can produce the same a(n) value much faster than the decrease in prime density which is decelerating with larger n. - Richard R. Forberg, Feb 17 2015

Examples

			A000040(10)=29, A000040(10+1)=31, A001248(10)=841, A001248(10+1)=961, a(10) = 961 - 841 = 120, A069486(10) = 2*31*29 = 1798, A069484(10) = 961 + 841 = 1802:
120^2 + 1798^2 = 14400 + 3232804 = 3247204 = 1802^2.
		

Crossrefs

Programs

  • Haskell
    a069482 n = a069482_list !! (n-1)
    a069482_list = zipWith (-) (tail a001248_list) a001248_list
    -- Reinhard Zumkeller, Jun 08 2015
    
  • Magma
    [NthPrime(n+1)^2 - NthPrime(n)^2: n in [1..40]]; // G. C. Greubel, May 19 2019
    
  • Mathematica
    Table[Prime[n+1]^2 - Prime[n]^2, {n, 1, 40}] (* Vladimir Joseph Stephan Orlovsky, Mar 01 2009; modified by G. C. Greubel, May 19 2019 *)
    #[[2]]-#[[1]]&/@Partition[Prime[Range[60]]^2,2,1] (* Harvey P. Dale, Jan 13 2011 *)
    Differences[Prime[Range[100]]^2](* Waldemar Puszkarz, Feb 09 2015 *)
  • PARI
    {a(n) = prime(n+1)^2 - prime(n)^2}; \\ G. C. Greubel, May 19 2019
    
  • Python
    from sympy import prime, primerange
    def aupton(terms):
      p = list(primerange(1, prime(terms+1)+1))
      return [p[n+1]**2-p[n]**2 for n in range(terms)]
    print(aupton(50)) # Michael S. Branicky, May 16 2021
  • Sage
    [nth_prime(n+1)^2 - nth_prime(n)^2 for n in (1..40)] # G. C. Greubel, May 19 2019
    
Previous Showing 11-20 of 174 results. Next