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

A126199 a(n) = prime(n)*prime(n+1) + prime(n) + prime(n+1).

Original entry on oeis.org

11, 23, 47, 95, 167, 251, 359, 479, 719, 959, 1215, 1595, 1847, 2111, 2591, 3239, 3719, 4215, 4895, 5327, 5919, 6719, 7559, 8819, 9995, 10607, 11231, 11879, 12539, 14591, 16895, 18215, 19319, 20999, 22799, 24015, 25911, 27551, 29231, 31319, 32759
Offset: 1

Views

Author

Jonathan Vos Post, Mar 08 2007

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = Prime[n], q = Prime[n + 1]}, p*q + p + q]; Array[f, 42] (* Robert G. Wilson v, Mar 09 2007 *)
    Times@@#+Total[#]&/@Partition[Prime[Range[50]],2,1] (* Harvey P. Dale, Nov 01 2017 *)

Formula

a(n) = A180617(n) - 1. - Omar E. Pol, Dec 08 2019

Extensions

More terms from Robert G. Wilson v, Mar 09 2007

A206329 Squarefree sums of 2 successive primes.

Original entry on oeis.org

5, 30, 42, 78, 138, 186, 210, 222, 258, 330, 390, 410, 434, 462, 618, 762, 786, 798, 906, 930, 946, 966, 978, 1002, 1030, 1230, 1290, 1334, 1374, 1410, 1446, 1482, 1518, 1542, 1606, 1722, 1758, 1770, 1794, 1830, 1866, 1878, 1938, 1974, 2006, 2022, 2190, 2226
Offset: 1

Views

Author

Zak Seidov, Feb 06 2012

Keywords

Comments

Intersection of A001043 and A005117, both infinite, but is their intersection infinite?
Also note that the only prime is a(1)=5 and there are no semiprimes (products of 2 primes A001358).

Examples

			a(1)=5=A001043(1)=A005117(4), a(2)=30=A001043(6)=A005117(19), a(3)=42=A001043(8)=A005117(28).
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get the first N terms
    count:= 0:
    p:= 2:
    while count < N do
      pp:= nextprime(p);
      if numtheory:-issqrfree(p+pp) then
        count:= count+1;
        A[count]:= p+pp;
      fi;
      p:= pp;
    od:
    seq(A[i],i=1..N);
    # Robert Israel, Jul 20 2014
  • Mathematica
    Select[Table[Prime[n] + Prime[n + 1], {n, 300}], SquareFreeQ] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2012 *)
  • PARI
    p=2;forprime(q=3,1e4,if(issquarefree(p+q),print1(p+q", "));p=q) \\ Charles R Greathouse IV, Feb 08 2012

A247245 Least multiple of n that is the sum of 2 successive primes.

Original entry on oeis.org

5, 8, 12, 8, 5, 12, 42, 8, 18, 30, 198, 12, 52, 42, 30, 112, 68, 18, 152, 60, 42, 198, 138, 24, 100, 52, 162, 84, 696, 30, 186, 128, 198, 68, 210, 36, 222, 152, 78, 120, 410, 42, 172, 308, 90, 138, 564, 144, 882, 100, 204, 52, 1272, 162, 330, 112, 456, 696, 472, 60, 1220, 186, 630, 128, 390
Offset: 1

Views

Author

Zak Seidov, Nov 28 2014

Keywords

Comments

a(n) = n if n is a term of A001043 (on graph this corresponds to the lower bound).

Examples

			5 is a term because prime(1) + prime(2) = 2 + 3 = 5 = 5*1 (k = 5),
8 is a term because prime(2) + prime(3) = 3 + 5 = 8 = 4*2 (k = 4),
198 is a term because prime(25) + prime(26) = 97 + 101 = 198 = 18*11 (k = 18).
		

Crossrefs

Cf. A001043.

Programs

  • PARI
    is(n) = (precprime((n-1)/2) + nextprime(n/2) == n) && (n>2); \\ A001043
    a(n) = my(k=1); while (!is(k*n), k++); k*n; \\ Michel Marcus, Oct 06 2021

Formula

a(n) = smallest number, of the form k*n (k >= 1), that is the sum of 2 successive primes.

A336371 Numbers k such that gcd(k, prime(k) + prime(k-1)) > 1.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 13, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 76, 78, 80, 81, 82, 84, 86, 88, 90, 92, 93, 94, 95, 96, 98, 99, 100
Offset: 1

Views

Author

Clark Kimberling, Oct 04 2020

Keywords

Crossrefs

Programs

  • Mathematica
    p[n_] := Prime[n];
    u = Select[Range[2, 200], GCD[#, p[#] + p[# - 1]] == 1 &]  (* A336370 *)
    v = Select[Range[2, 200], GCD[#, p[#] + p[# - 1]] > 1 &]   (* A336371 *)
    Prime[u]  (* A336372 *)
    Prime[v]  (* A336373 *)

Formula

In the following table, p(k) = A000040(k) = prime(k).
k p(k) p(k)+p(k-1) gcd
2 3 5 1
3 5 8 1
4 7 12 4
5 11 18 1
6 13 24 6
2 and 3 are in A336370; 4 and 6 are in this sequence; 3 and 5 are in A336372; 7 and 13 are in A336373.

Extensions

Offset corrected by Mohammed Yaseen, Jun 02 2023

A347137 a(n) = Sum_{d|n} phi(d) * A003961(n/d), where A003961 shifts the prime factorization of its argument one step towards larger primes, and phi is Euler totient function.

Original entry on oeis.org

1, 4, 7, 14, 11, 28, 17, 46, 41, 44, 23, 98, 29, 68, 77, 146, 35, 164, 41, 154, 119, 92, 51, 322, 97, 116, 223, 238, 59, 308, 67, 454, 161, 140, 187, 574, 77, 164, 203, 506, 83, 476, 89, 322, 451, 204, 99, 1022, 229, 388, 245, 406, 111, 892, 253, 782, 287, 236, 119, 1078, 127, 268, 697, 1394, 319, 644, 137, 490
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2021

Keywords

Comments

Dirichlet convolution of Euler phi (A000010) with the prime shift function (A003961). Multiplicative because both A000010 and A003961 are.
Dirichlet convolution of the identity function (A000027) with the prime shifted phi (A003972).
Möbius transform of A347136.

Crossrefs

Cf. A000010, A000027, A000040, A001043, A003961, A003972, A008683, A151800, A347122, A347136 (inverse Möbius transform).
Cf. also A018804, A347237.

Programs

  • Mathematica
    f[p_, e_] := (q = NextPrime[p])^e + (p - 1)*(q^e - p^e)/(q - p); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2023 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A347137(n) = sumdiv(n,d,eulerphi(n/d)*A003961(d));

Formula

a(n) = Sum_{d|n} A000010(n/d) * A003961(d).
a(n) = Sum_{d|n} d * A003972(n/d).
a(n) = Sum_{d|n} A008683(n/d) * A347136(d).
a(n) = A347122(n) + 2*A000010(n).
a(A000040(n)) = A001043(n) - 1.
Multiplicative with a(p^e) = q(p)^e + (p-1)*(q(p)^e - p^e)/(q(p) - p), where q(p) = nextprime(p) = A151800(p). - Amiram Eldar, Sep 16 2023

A349660 Numbers which are the sum of a prime and the square of the next prime.

Original entry on oeis.org

11, 28, 54, 128, 180, 302, 378, 548, 864, 990, 1400, 1718, 1890, 2252, 2856, 3534, 3780, 4550, 5108, 5400, 6314, 6968, 8004, 9498, 10298, 10710, 11552, 11988, 12878, 16242, 17288, 18900, 19458, 22340, 22950, 24800, 26726, 28052, 30096, 32214, 32940, 36662
Offset: 1

Views

Author

Karl-Heinz Hofmann, Nov 24 2021

Keywords

Examples

			a(2) = 3 + 5^2 = 28; a(3) = 5 + 7^2 = 54.
		

Crossrefs

Programs

  • Mathematica
    nterms=100;Table[Prime[n]+Prime[n+1]^2,{n,nterms}] (* Paolo Xausa, Nov 24 2021 *)
  • PARI
    a(n) = prime(n) + prime(n+1)^2; \\ Michel Marcus, Nov 24 2021
  • Python
    from sympy import sieve;
    for n in range(1,10001): print(sieve[n] + sieve[n+1]**2)
    

Formula

a(n) = prime(n) + prime(n+1)^2.
a(n) = A000040(n) + A001248(n+1).
a(n) = A036690(n+1) - A001223(n).
a(n) = A001043(n) + A036689(n+1). - Michel Marcus, Nov 24 2021

A096215 Greatest primes not greater than the sum of two succeeding primes.

Original entry on oeis.org

5, 7, 11, 17, 23, 29, 31, 41, 47, 59, 67, 73, 83, 89, 97, 109, 113, 127, 137, 139, 151, 157, 167, 181, 197, 199, 199, 211, 211, 239, 257, 263, 271, 283, 293, 307, 317, 317, 337, 349, 359, 367, 383, 389, 389, 409, 433, 449, 449, 461, 467, 479, 491, 503, 509, 523
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 28 2004

Keywords

Crossrefs

Programs

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

Formula

a(n) = A007917(A001043(n)).

A100479 a(n) = prime(2n-1) + prime(2n).

Original entry on oeis.org

5, 12, 24, 36, 52, 68, 84, 100, 120, 138, 152, 172, 198, 210, 222, 258, 276, 300, 320, 340, 360, 384, 396, 434, 456, 472, 492, 520, 540, 558, 576, 618, 630, 668, 696, 712, 740, 762, 786, 810, 840, 864, 882, 906, 924, 946, 978, 1002, 1030, 1064, 1104, 1132
Offset: 1

Views

Author

Jun Mizuki (suzuki32(AT)sanken.osaka-u.ac.jp), Nov 22 2004

Keywords

Crossrefs

Programs

  • Magma
    [(&+[NthPrime(2*n+j-1): j in [0..1]]): n in [1..70]]; // G. C. Greubel, Apr 05 2023
    
  • Maple
    A100479 := proc(n)
        ithprime(2*n-1)+ithprime(2*n) ;
    end proc:
    seq(A100479(n),n=1..50) ; # R. J. Mathar, Jan 20 2025
  • Mathematica
    Total/@Partition[Prime[Range[110]],2] (* Harvey P. Dale, Apr 20 2016 *)
  • SageMath
    [sum(nth_prime(2*n+j-1) for j in range(2)) for n in range(1, 71)] # G. C. Greubel, Apr 05 2023

Formula

a(n) = A001043(2n-1). - R. J. Mathar, Apr 20 2009
a(n) = A031368(n) + A031215(n). - G. C. Greubel, Apr 05 2023

A103271 a(n) = (prime(n)+prime(n+1)) mod 4.

Original entry on oeis.org

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

Views

Author

Yasutoshi Kohmoto, Jan 27 2005

Keywords

Comments

The number of 2's among the first N terms are: count(10^3) = 381, count (10^4) = 4137, count(10^5) = 42638, count(10^6) = 437423, count(10^7) = 4448503. - M. F. Hasler, Apr 27 2016
In terms of vectors a = (p(n),p(n+1)) mod 4, as considered in the preprint arxiv:1603.03720, the 2's group together the cases a = (1,1) and (3,3) and 0's cumulate cases (1,3) and (3,1). Assuming that the two subcases of each case have roughly the same probabilities, the above counts (i.e., percentage of 44.5% : 55.5% at 10^7) are compatible with the data in the 2nd table on bottom of p.14 where respective percentages vary from 44.8% : 55.1% (at 10^10) to 46% : 54% (at 10^12). I found that at p(n) ~ 10^80, the percentages become closer than 49% : 51%. - M. F. Hasler, May 12 2016

Crossrefs

Programs

  • Maple
    seq(ithprime(n)+ithprime(n+1) mod 4, n=1..150); # Emeric Deutsch, May 31 2005
  • Mathematica
    Table[Mod[Prime@ n + Prime[n + 1], 4], {n, 120}] (* Michael De Vlieger, Apr 27 2016 *)
    Mod[Total[#],4]&/@Partition[Prime[Range[120]],2,1] (* Harvey P. Dale, Mar 16 2025 *)
  • PARI
    a(n) = (prime(n) + prime(n+1)) % 4; \\ Michel Marcus, Apr 14 2016

Formula

a(n) = A001043(n) mod 4. - Michel Marcus, Apr 14 2016

Extensions

More terms from Emeric Deutsch, May 31 2005
Prepended a(1) = 1, Joerg Arndt, Apr 14 2016

A154634 Numbers that are the first of two consecutive primes having a sum that is the product of two consecutive numbers.

Original entry on oeis.org

5, 13, 19, 43, 103, 113, 229, 293, 349, 463, 739, 773, 859, 1171, 1429, 1483, 3079, 3229, 3319, 3823, 4003, 4273, 5449, 6781, 6899, 7129, 7369, 7499, 7873, 7993, 10729, 11173, 11321, 11779, 12241, 12553, 13523, 13693, 14533, 14699, 17203, 17389
Offset: 1

Views

Author

J. M. Bergot, Jan 13 2009

Keywords

Comments

Is the sequence mostly uniformly distributed or do clusters occur for the products? One could also find sums of 2n consecutive primes equaling the product of 2n numbers.

Examples

			For the pair of consecutive primes 1429 and 1433, their sum is 2862=53*54.
773 and 787 are consecutive primes. 773+787 = 1560 = 39*40, hence 773 is in the sequence. - _Klaus Brockhaus_, Jan 15 2009
		

Programs

  • Magma
    [ p: p in PrimesUpTo(18000) | r*(r+1) eq s where r is Iroot(s, 2) where s is p+NextPrime(p) ]; // Klaus Brockhaus, Jan 15 2009
  • Maple
    isA002378 := proc(n) local a; a := floor(sqrt(n)) ; RETURN( a*(a+1) = n ) ; end: for i from 1 to 5000 do p := ithprime(i) ; a001043 := p+nextprime(p) ; if isA002378(a001043) then printf("%d,",p) ; fi; od: # R. J. Mathar, Jan 15 2009
    a := proc (n) local p, s: p := ithprime(n): s := p+nextprime(p): if type((1/2)*sqrt(1+4*s)-1/2, integer) = true then p else end if end proc: seq(a(n), n = 1 .. 3000); # Emeric Deutsch, Jan 15 2009
  • Mathematica
    sp2Q[{a_,b_}]:=Module[{s=Floor[Sqrt[a+b]]},a+b==s(s+1)]; Select[Partition[ Prime[ Range[2100]],2,1],sp2Q][[All,1]] (* Harvey P. Dale, Jun 28 2020 *)

Formula

{A000040(i): A001043(i) in A002378}. - R. J. Mathar, Jan 15 2009

Extensions

Corrected and extended by several correspondents, Jan 15 2009
Previous Showing 61-70 of 174 results. Next