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

A139025 This is to A014688 as A014688 to A000027, see comments for definition.

Original entry on oeis.org

4, 7, 14, 23, 84, 107, 120, 135, 172, 183, 234, 283, 396, 433, 446, 519, 588, 617, 638, 661, 680, 695, 706, 725, 758, 783, 854, 891, 1000, 1043, 1064, 1119, 1226, 1283, 1458, 1469, 1490, 1521, 1618, 1661, 1708, 1765, 2046, 2157, 2224, 2333, 2428, 2507, 2516
Offset: 1

Views

Author

Zak Seidov, Apr 07 2008

Keywords

Comments

Take some initial sequence s1 = a(1), a(2),...
then for new sequence s2 = b(1), b(2),.. we define
b(n) = n + (n-th prime in s1).
If s1 = A000027 then we clearly get A014688.
If s1 = A014688 = 3,5,8,11,16,19,24,27,32,39,42,49,54,57,62,69,76,79,86,91,94
then b(1) = 1 + 3 (because 3 is the first prime in s1)
b(2) = 2 + 5 (because 5 is the 2nd prime in s1)
b(3) = 3 + 11 (because 11 is the 3rd prime in s1)
b(4) = 4 + 19 (because 19 is the 4th prime in s1)
b(5) = 5 + 79 (because 79 is the 5th prime in s1),
resulting sequence is A139025
Repeating the same procedure we have next sequences:
A139026: 8,25,110,287,438,623,668,1291,2342,2813,3790,3863,4230,4663,4828,6377,7468
A139027: 1292,3865,4666,8973,13936,50339,57266,67597,72316,85343,110934,132941,147990
A139028:270240,375255,635282,1000695,2039428,2602013,3398274,3748771,4300120
A139029:43448724,59672019,102128690,113904945,145135734,169755139

Crossrefs

Formula

A139026 This is to A139025 as A139025 to A014688, see A139025 for details.

Original entry on oeis.org

8, 25, 110, 287, 438, 623, 668, 1291, 2342, 2813, 3790, 3863, 4230, 4663, 4828, 6377, 7468, 8969, 9122, 9759, 10202, 11505, 12804, 13931, 15078, 15765, 16360, 16475, 16858, 18179, 18950, 19171, 19574, 19761, 19962, 20885, 22040, 24981, 25406
Offset: 1

Views

Author

Zak Seidov, Apr 07 2008

Keywords

Comments

Notice that a(n)-n is always prime by definition, e.g.,
a(1) - 1 = 7, a(2) - 2 = 23, a(3) - 3 = 107, etc.

Crossrefs

A061068 Primes which are the sum of a prime and its subscript.

Original entry on oeis.org

3, 5, 11, 19, 79, 101, 113, 127, 163, 173, 223, 271, 383, 419, 431, 503, 571, 599, 619, 641, 659, 673, 683, 701, 733, 757, 827, 863, 971, 1013, 1033, 1087, 1193, 1249, 1423, 1433, 1453, 1483, 1579, 1621, 1667, 1723, 2003, 2113, 2179, 2287, 2381, 2459, 2467
Offset: 1

Views

Author

Labos Elemer, May 28 2001

Keywords

Comments

a(n) = A061067(n-1) + A064402(n). - Leroy Quet, Jun 30 2006
This sequence is the intersection of A014688 with the set of primes. Conjecture: this sequence is infinite, yet derives from arbitrarily long "prime deserts" such as the 11 composites in A014688 between a(6) = 19 and a(18) = 79 and the 17 composites in A014688 between a(48) = 271 and a(66) = 383. - Jonathan Vos Post, Nov 22 2004
Primes not of the form n + pi(n-1). - Thomas Ordowski, Sep 21 2013
Except for the first pair (3, 5) no two consecutive primes are terms of the sequence. - Zak Seidov, Nov 10 2013

Examples

			5th term is 79=61+18=prime(18)+18.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500], PrimeQ[Prime[ # ] + # ] &] + Prime[Select[Range[500], PrimeQ[Prime[ # ] + # ] &]] (* Stefan Steinerberger, Jul 21 2006 *)
  • PARI
    { n=0; m=0; forprime (p=2, 109567, if (isprime(p + m++), write("b061068.txt", n++, " ", p + m)) ) } \\ Harry J. Smith, Jul 17 2009

Extensions

Edited by N. J. A. Sloane, Apr 29 2007
Definition clarified by Jonathan Sondow, Jul 12 2012

A234694 a(n) = |{0 < k < n: p = k + prime(n-k) and prime(p) - p + 1 are both prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 29 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 9. Also, for any integer n > 51 there is a positive integer k < n such that p = k + prime(n-k) and prime(p) + p + 1 are both prime.
(ii) If n > 9 (or n > 21), then there is a positive integer k < n such that m - 1 and prime(m) + m (or prime(m) - m, resp.) are both prime, where m = k + prime(n-k).
(iii) If n > 483, then for some 0 < k < n both prime(m) + m and prime(m) - m are prime, where m = k + prime(n-k).
(iv) If n > 3, then there is a positive integer k < n such that prime(k + prime(n-k)) + 2 is prime.
Clearly, part (i) of the conjecture implies that there are infinitely many primes p with prime(p) - p + 1 (or prime(p) + p + 1) also prime.
See A234695 for primes p with prime(p) - p + 1 also prime.

Examples

			a(5) = 1 since 2 + prime(3) = 7 and prime(7) - 6 = 11 are both prime.
a(25) = 1 since 20 + prime(5) = 31 and prime(31) - 30 = 97 are both prime.
a(27) = 1 since 18 + prime(9) = 41 and prime(41) - 40 = 139 are both prime.
a(45) = 1 since 6 + prime(39) = 173 and prime(173) - 172 = 859 are both prime.
a(49) = 1 since 26 + prime(23) = 109 and prime(109) - 108 = 491 are both prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=k+Prime[n-k]
    q[n_,k_]:=PrimeQ[f[n,k]]&&PrimeQ[Prime[f[n,k]]-f[n,k]+1]
    a[n_]:=Sum[If[q[n,k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A064402 Numbers n such that prime(n)+n is a prime, where prime(n) denotes the n-th prime number.

Original entry on oeis.org

1, 2, 4, 6, 18, 22, 24, 26, 32, 34, 42, 48, 66, 70, 72, 82, 92, 96, 98, 100, 102, 104, 106, 108, 114, 116, 126, 130, 144, 150, 152, 158, 172, 180, 200, 202, 204, 206, 218, 222, 228, 236, 270, 282, 290, 300, 312, 322, 324, 328, 330, 350, 352, 356, 362, 378, 384
Offset: 1

Views

Author

Robert G. Wilson v, Sep 28 2001

Keywords

Comments

a(n) = order among the primes of A061067(n).
Except for the first one all terms are even. Conjecture: First differences include all even integers. - Zak Seidov, Nov 10 2013

Crossrefs

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +n)]; // Vincenzo Librandi, Apr 06 2011
  • Mathematica
    Select[ Range[ 400 ], PrimeQ[ Prime[ # ] + # ] & ]
  • PARI
    { n=0; for (m=1, 10^9, if (isprime(prime(m) + m), write("b064402.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 13 2009
    

Formula

a(n) = A061068(n) - A061067(n-1).
A014688(a(n)) = A061068(n). - Zak Seidov, Nov 10 2013

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 08 2007

A133041 Sum of n and partition number of n.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 17, 22, 30, 39, 52, 67, 89, 114, 149, 191, 247, 314, 403, 509, 647, 813, 1024, 1278, 1599, 1983, 2462, 3037, 3746, 4594, 5634, 6873, 8381, 10176, 12344, 14918, 18013, 21674, 26053, 31224, 37378, 44624, 53216
Offset: 0

Views

Author

Omar E. Pol, Oct 29 2007

Keywords

Crossrefs

Cf. A000041 (the partition numbers).
Partial sums of A232697.

Programs

Formula

a(n) = n + partition(n) = n + A000041(n).
a(n) = A207779(A000041(n)), n >= 1. - Omar E. Pol, Jul 17 2014

A095116 a(n) = prime(n) + n - 1.

Original entry on oeis.org

2, 4, 7, 10, 15, 18, 23, 26, 31, 38, 41, 48, 53, 56, 61, 68, 75, 78, 85, 90, 93, 100, 105, 112, 121, 126, 129, 134, 137, 142, 157, 162, 169, 172, 183, 186, 193, 200, 205, 212, 219, 222, 233, 236, 241, 244, 257, 270, 275, 278, 283, 290, 293, 304, 311, 318, 325
Offset: 1

Views

Author

Dean Hickerson, following a suggestion of Leroy Quet, May 28 2004

Keywords

Comments

Positions of second occurrences of n in A165634: A165634(a(n)) = n. [Reinhard Zumkeller, Sep 23 2009]
a(n) = b(n)-th highest positive integer not equal to any a(k), 1 <= k <= n-1, where b(n) = primes = A000040(n). a(1) = 2, a(n) = a(n-1) + A000040(n) - A000040(n-1) + 1 for n >= 2. a(1) = 2, a(n) = a(n-1) + A001223(n-1) + 1 for n >= 2. a(n) = A014688(n) - 1. [Jaroslav Krizek, Oct 28 2009]
Comment from N. J. A. Sloane, Mar 28 2024 (Start):
On March 23 2024, Davide Rotondo sent me an email with the following conjecture. (I've simplified it a bit.)
For a positive integer n, define a sequence b by b(0) = n; b(i) = n - pi(b(i-1)) for i >= 1, where pi(x) = number of primes <= x.
The conjecture is that after some initial terms, b becomes periodic with period length 1 or 2, and the n for which the period is 2 are 3 together with the present sequence, that is, 2, 3, 4, 7, 10, 15, 18, 23, 26, 31, 38, 41, 48, ... (End)
Proof from Robert Israel, Mar 26 2024 (Start):
This is simply a consequence of the fact that if x < y, 0 <= pi(y) - pi(x) <= y - x and the inequality on the right is strict if y-x > 1 except for the case of 1 and 3.
Thus we start with b(0) - b(1) = pi(n). While |b(i) - b(i+1)| > 2 we get |b(i+1) - b(i+2)| = |pi(b(i+1)) - pi(b(i+2))| < |b(i) - b(i+1)|.
Eventually we must either reach |b(j+1) - b(j)| = 0 or |b(j+1) - b(j)| = 1.
If we reach 0, i.e. b(j+1) = b(j), then clearly b(k) = b(j) for all k > j.
If b(j+1) = b(j) + 1 = n - pi(b(j)), then b(j+2) = n - pi(b(j)+1) = b(j+1) or b(j+1)-1.
If b(j+1) = b(j) - 1, then b(j+2) = n - pi(b(j)-1) = b(j+1) or b(j+1)+1.
Thus from this point on we either get a 2-cycle or a 1-cycle. (End)

Crossrefs

Complement of A095117.
Essentially the same sequence as A014690.

Programs

Formula

a(n) = A014690(n-1), n > 1. [R. J. Mathar, Sep 05 2008]

A064371 Zero, together with positive numbers k such that prime(k) + k is a square.

Original entry on oeis.org

0, 5, 12, 86, 105, 176, 214, 230, 241, 412, 503, 696, 1065, 1147, 1170, 1273, 1334, 2021, 2455, 2600, 2660, 2772, 3299, 3332, 3365, 4417, 4861, 6478, 6572, 8115, 8858, 8905, 9229, 9380, 9590, 9692, 9749, 10501, 10829, 11338, 11633, 11690, 12099
Offset: 1

Views

Author

Jason Earls, Sep 26 2001

Keywords

Crossrefs

Cf. A014688.

Programs

  • Magma
    [0] cat [n: n in [1..12500] | IsSquare(NthPrime(n)+n)]; // Bruno Berselli, May 26 2011
  • Mathematica
    Join[{0},Transpose[Select[Table[{n,Prime[n]},{n,15000}], IntegerQ[ Sqrt[ Total[#]]]&]][[1]]] (* Harvey P. Dale, May 26 2011 *)
  • PARI
    j=[]; for(n=0,20000, if(n==0 || issquare(prime(n)+n), j=concat(j,n))); j
    
  • PARI
    { n=0; default(primelimit, 20000000); for (m=0, 10^9, if (m==0 || issquare(prime(m) + m), write("b064371.txt", n++, " ", m); if (n==300, break)) ) } \\ Harry J. Smith, Sep 14 2009
    

Extensions

Edited by Harry J. Smith, Sep 14 2009

A100493 a(n) = n + n-th semiprime.

Original entry on oeis.org

5, 8, 12, 14, 19, 21, 28, 30, 34, 36, 44, 46, 48, 52, 54, 62, 66, 69, 74, 77, 79, 84, 88, 93, 99, 103, 109, 113, 115, 117, 122, 125, 127, 129, 141, 147, 152, 156, 158, 161, 163, 165, 172, 177, 179, 187, 189, 191, 194, 196, 206, 210, 212, 215, 221, 225, 234, 236
Offset: 1

Views

Author

Jonathan Vos Post, Nov 20 2004

Keywords

Comments

This is the semiprime analog of A014688.

Examples

			a(7) = 7 + semiprime(7) = 7 + 21 = 28.
		

Crossrefs

Programs

  • Magma
    m:=300;
    A001222:=[n eq 1 select 0 else (&+[p[2]: p in Factorization(n)]): n in [1..4*m]];
    A001358:=[n: n in [1..4*m] | A001222[n] eq 2];
    A100493:= func< n | n + A001358[n] >;
    [A100493(n): n in [1..m]]; // G. C. Greubel, Apr 04 2023
    
  • Maple
    N:= 1000: # to use semiprimes <= N
    Primes:= select(isprime, [2,seq(i,i=3..N,2)]):
    Semiprimes:= sort(convert(select(`<=`,{seq(seq(Primes[i]*Primes[j],i=1..j),j=1..nops(Primes))},N),list)):
    seq(i+Semiprimes[i],i=1..nops(Semiprimes)); # Robert Israel, Dec 20 2015
  • Mathematica
    m=300;
    A001358:= A001358= Select[Range[5*m], PrimeOmega[#]==2 &];
    A100493[n_]:= n + A001358[[n]];
    Table[A100493[n], {n, m}] (* G. C. Greubel, Apr 04 2023 *)
  • PARI
    lista(n)= my(s=0); vector(n, i, while(2!=bigomega(s++), ); i+s); \\ Ruud H.G. van Tol, Mar 10 2025
  • SageMath
    from sympy import primeomega
    b=[n for n in (1..1000) if primeomega(n)==2]
    [n+b[n-1] for n in range(1,301)] # G. C. Greubel, Apr 04 2023
    

Formula

a(n) = n + A001358(n).
a(n) ~ n log n / log log n. [Charles R Greathouse IV, Dec 28 2011]

Extensions

Edited, corrected and extended by Ray Chandler, Nov 26 2004

A078916 a(n) = prime(n) + 2*n.

Original entry on oeis.org

4, 7, 11, 15, 21, 25, 31, 35, 41, 49, 53, 61, 67, 71, 77, 85, 93, 97, 105, 111, 115, 123, 129, 137, 147, 153, 157, 163, 167, 173, 189, 195, 203, 207, 219, 223, 231, 239, 245, 253, 261, 265, 277, 281, 287, 291, 305, 319, 325, 329, 335, 343, 347, 359, 367, 375
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 13 2002

Keywords

Crossrefs

Programs

Formula

a(n) = A014688(n) + n. - Zak Seidov, Nov 10 2013
a(n) = A000040(n) + A005843(n). - Elmo R. Oliveira, Jan 21 2023
Showing 1-10 of 63 results. Next