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

A337334 a(n) = pi(b(n)), where pi is the prime counting function (A000720) and b(n) = a(n-1) + b(n-1) with a(0) = b(0) = 1.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 9, 11, 14, 16, 21, 24, 30, 35, 42, 48, 58, 67, 78, 91, 103, 121, 138, 158, 181, 205, 233, 266, 298, 337, 378, 429, 480, 539, 602, 674, 751, 838, 930, 1031, 1147, 1274, 1402, 1556, 1715, 1896, 2090, 2296, 2527, 2777, 3047, 3340, 3669, 4016
Offset: 0

Views

Author

Ya-Ping Lu, Aug 23 2020

Keywords

Comments

It can be proved that this is an increasing sequence from the theorem of Lu and Deng (see LINKS), which states "the prime gap of a prime number is less than or equal to the prime count of the prime number”, or prime(n+1) - prime(n) <= pi(prime(n)).

Examples

			a(1) = pi(b(1)) = pi(a(0) + b(0)) = pi(1 + 1) = pi(2) = 1
a(2) = pi(b(2)) = pi(a(1) + b(1)) = pi(1 + 2) = pi(3) = 2
a(3) = pi(b(3)) = pi(a(2) + b(2)) = pi(2 + 3) = pi(5) = 3
a(4) = pi(b(4)) = pi(a(3) + b(3)) = pi(3 + 5) = pi(8) = 4
a(54)= pi(b(54))= pi(a(53)+ b(53))= pi(3669+34327)=pi(37996)=4016
		

Crossrefs

Cf. A000720 (pi), A014688 (prime(n)+n), A332086.

Programs

  • Maple
    A337334 := proc(n)
        option remember;
        if n = 0 then
            1;
        else
            numtheory[pi](A061535(n)) ;
        end if;
    end proc:
    seq(A337334(n),n=0..20) ; # R. J. Mathar, Jun 18 2021
  • Python
    from sympy import primepi
    a_last = 1
    b_last = 1
    for n in range(1, 1001):
        b = a_last + b_last
        a = primepi(b)
        print(a)
        a_last = a
        b_last = b

Formula

a(n) = pi(b(n)), where b(n) = a(n-1) + b(n-1) with a(0) = b(0) = 1.
a(n) = A000720(A061535(n)), n>=1. - R. J. Mathar, Jun 18 2021

Extensions

a(0) inserted by R. J. Mathar, Jun 18 2021

A065995 a(n) = prime(prime(n) + n).

Original entry on oeis.org

5, 11, 19, 31, 53, 67, 89, 103, 131, 167, 181, 227, 251, 269, 293, 347, 383, 401, 443, 467, 491, 547, 577, 617, 673, 709, 733, 761, 787, 823, 929, 967, 1013, 1031, 1097, 1117, 1181, 1229, 1277, 1303, 1373, 1409, 1481, 1489, 1531, 1553, 1627, 1741, 1783
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 10 2001

Keywords

References

  • Popular Computing (Calabasas, CA), A Function Of Primes, Problem 206, Vol. 5 (No. 55, Oct 1977), page PC55-19. Asks for rate of growth of a(n).

Crossrefs

Programs

  • Maple
    p:=ithprime; f:=n->p(p(n)+n); [seq(f(n),n=1..1000)]; # N. J. A. Sloane, Apr 16 2015
  • Mathematica
    Table[Prime[n+ Prime[n]], {n, 100}] (* Waldemar Puszkarz, Jan 24 2015 *)
  • PARI
    a(n) = prime(prime(n) + n); \\ Harry J. Smith, Nov 06 2009
    
  • PARI
    \\ See PARI link

Formula

a(n) = A000040(A014688(n)). - Omar E. Pol, Oct 22 2013

A076556 Greatest prime divisor of n-th prime + n.

Original entry on oeis.org

3, 5, 2, 11, 2, 19, 3, 3, 2, 13, 7, 7, 3, 19, 31, 23, 19, 79, 43, 13, 47, 101, 53, 113, 61, 127, 13, 5, 23, 13, 79, 163, 17, 173, 23, 17, 97, 67, 103, 71, 11, 223, 13, 79, 11, 7, 43, 271, 23, 31, 71, 97, 7, 61, 13, 29, 163, 47, 7, 31, 43, 71, 37, 5, 7, 383, 199, 5, 13, 419
Offset: 1

Views

Author

Zak Seidov, Oct 19 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[FactorInteger[Prime[n]+n][[-1,1]],{n,70}] (* Harvey P. Dale, Jan 19 2015 *)

A104935 Primes squared of the form k + prime(k).

Original entry on oeis.org

49, 529, 1681, 10609, 26569, 27889, 72361, 100489, 109561, 196249, 214369, 727609, 863041, 877969, 1142761, 1371241, 1471369, 1692601, 1957201, 2199289, 2601769, 2745649, 3500641, 3613801, 3798601, 3972049, 4214809, 5812921, 6405961, 7134241, 7349521
Offset: 1

Views

Author

Zak Seidov, Apr 25 2005

Keywords

Comments

Primes squared in A014688.

Crossrefs

Cf. A014688.
Subsequence of A104992.

Programs

  • PARI
    lista(nn) = {vec = vector(nn, i, i + prime(i)); pp = select(i->(issquare(i) && isprime(sqrtint(i))), vec); print(pp);} \\ Michel Marcus, Oct 09 2013

Extensions

a(12) - a(16) from Michel Marcus, Oct 09 2013
a(17) onward from Zak Seidov, Mar 13 2014

A104992 Squares of the form n+prime(n).

Original entry on oeis.org

16, 49, 529, 676, 1225, 1521, 1681, 1764, 3249, 4096, 5929, 9604, 10404, 10609, 11664, 12321, 19600, 24336, 25921, 26569, 27889, 33856, 34225, 34596, 46656, 51984, 71289, 72361, 91204, 100489, 101124, 104976, 106929, 109561, 110889, 111556, 121104, 125316, 131769, 135424, 136161, 141376, 152881, 156816, 163216, 166464, 179776, 188356
Offset: 1

Views

Author

Zak Seidov, Apr 25 2005

Keywords

Crossrefs

Squares in A014688.

Programs

  • Mathematica
    Select[Table[n+Prime[n],{n,20000}],IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Sep 21 2024 *)
  • PARI
    lista(nn) = {vec = vector(nn, i, i + prime(i)); pp = select(i->(issquare(i)), vec); print(pp);} \\ Michel Marcus, Oct 09 2013

A106588 Difference between n-th prime squared and n-th perfect square.

Original entry on oeis.org

3, 5, 16, 33, 96, 133, 240, 297, 448, 741, 840, 1225, 1512, 1653, 1984, 2553, 3192, 3397, 4128, 4641, 4888, 5757, 6360, 7345, 8784, 9525, 9880, 10665, 11040, 11869, 15168, 16137, 17680, 18165, 20976, 21505, 23280, 25125, 26368, 28329, 30360
Offset: 1

Views

Author

Alexandre Wajnberg, May 10 2005

Keywords

Examples

			a(5) = 96 because 121 (fifth prime^2) - 25 (fifth square) = 96.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n)^2 - n^2: n in [1..50]]; // G. C. Greubel, Sep 07 2021
    
  • Mathematica
    Table[Prime[n]^2 - n^2, {n, 50}]
  • PARI
    a(n) = prime(n)^2 - n^2; \\ Michel Marcus, Sep 08 2021
  • Sage
    [nth_prime(n)^2 - n^2 for n in (1..50)] # G. C. Greubel, Sep 07 2021
    

Formula

a(n) = prime(n)^2 - n^2.

Extensions

Extended by Ray Chandler, May 13 2005

A115888 Palindromes equal to the sum of a prime number with its index.

Original entry on oeis.org

3, 5, 8, 11, 101, 242, 383, 424, 454, 545, 585, 606, 666, 676, 757, 949, 2552, 3443, 3663, 4664, 5445, 6006, 6886, 9339, 10001, 10601, 11411, 12321, 15551, 15651, 17871, 17971, 18281, 21412, 22622, 22922, 24642, 24942, 25752, 26762, 28582
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Examples

			666 = prime(103)+103.
		

Crossrefs

Subsequence of A002113.

Programs

  • Mathematica
    Select[Total/@Table[{n,Prime[n]},{n,3200}],PalindromeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 03 2017 *)
  • PARI
    ispal(n) = my(e=digits(n));e == Vecrev(e) \\ A002113
    for(k=1,10^6, b=k+prime(k);if(ispal(b),print1(b,", "))) \\ Alexandru Petrescu, Jun 15 2022

A135682 a(n)=n if n=1 or if n=prime. Otherwise, n=4 if n is even and n=7 if n is odd.

Original entry on oeis.org

1, 2, 3, 4, 5, 4, 7, 4, 7, 4, 11, 4, 13, 4, 7, 4, 17, 4, 19, 4, 7, 4, 23, 4, 7, 4, 7, 4, 29, 4, 31, 4, 7, 4, 7, 4, 37, 4, 7, 4, 41, 4, 43, 4, 7, 4, 47, 4, 7, 4, 7, 4, 53, 4, 7, 4, 7, 4, 59, 4, 61, 4, 7, 4, 7, 4, 67, 4, 7, 4, 71, 4, 73
Offset: 1

Views

Author

Mohammad K. Azarian, Dec 01 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[PrimeQ[n] || n == 1, n, If[EvenQ[n], 4, 7] ]; Table[a[n], {n,1,25}] (* G. C. Greubel, Oct 26 2016 *)

A135684 a(n)=11 if n is a prime number. Otherwise, a(n)=n.

Original entry on oeis.org

1, 11, 11, 4, 11, 6, 11, 8, 9, 10, 11, 12, 11, 14, 15, 16, 11, 18, 11, 20, 21, 22, 11, 24, 25, 26, 27, 28, 11, 30, 11, 32, 33, 34, 35, 36, 11, 38, 39, 40, 11, 42, 11, 44, 45, 46, 11, 48, 49, 50, 51, 52, 11, 54, 55, 56, 57, 58, 11
Offset: 1

Views

Author

Mohammad K. Azarian, Dec 01 2007

Keywords

Crossrefs

Programs

  • Magma
    [IsPrime(n) select 11 else n: n in [1..70]]; // Vincenzo Librandi, Feb 22 2013
  • Mathematica
    Table[If[PrimeQ[n], 11, n], {n, 70}] (* Vincenzo Librandi, Feb 22 2013 *)

A176628 a(n) = prime(n) - n*(-1)^prime(n).

Original entry on oeis.org

1, 5, 8, 11, 16, 19, 24, 27, 32, 39, 42, 49, 54, 57, 62, 69, 76, 79, 86, 91, 94, 101, 106, 113, 122, 127, 130, 135, 138, 143, 158, 163, 170, 173, 184, 187, 194, 201, 206, 213, 220, 223, 234, 237, 242, 245, 258, 271, 276, 279, 284, 291, 294, 305, 312, 319, 326
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 22 2010

Keywords

Comments

Unit together with n-th odd prime + n + 1.

Examples

			a(1) = prime(1) - 1*(-1)^prime(1) = 2-1 = 1.
		

Programs

  • Magma
    [1]cat[NthPrime(n) +n: n in [2..60]]; // G. C. Greubel, Jul 01 2021
    
  • Mathematica
    np[n_]:=Module[{npr=Prime[n]},npr-n (-1)^npr];Array[np,60] (* Harvey P. Dale, Oct 08 2011 *)
  • Sage
    [1]+[nth_prime(n) +n for n in (2..60)] # G. C. Greubel, Jul 01 2021

Formula

a(n+1) = A014688(n+1).

Extensions

Entries checked by R. J. Mathar, Apr 27 2010
Previous Showing 31-40 of 63 results. Next