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

A076757 Primes of the form n + pi(n), that is, generated in A077510.

Original entry on oeis.org

3, 5, 11, 13, 17, 19, 29, 37, 43, 47, 59, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 139, 149, 151, 163, 167, 173, 179, 181, 191, 197, 199, 211, 223, 227, 229, 239, 251, 263, 269, 271, 277, 281, 307, 313, 317, 331, 337, 347
Offset: 1

Views

Author

David Garber, Nov 13 2002

Keywords

Crossrefs

Programs

  • Magma
    [a: n in [1..400] | IsPrime(a) where a is (n + #PrimesUpTo(n))]; // Vincenzo Librandi, Jan 29 2017
  • Maple
    isA077510 := proc(n)
        isprime(n+numtheory[pi](n)) ;
    end proc:
    A077510 := proc(n)
        local a;
        if n = 1 then
            return 2;
        else
        for a from procname(n-1)+1 do
            if isA077510(a) then
                return a;
            end if;
        end do:
        end if:
    end proc:
    A076757 := proc(n)
        local a10 ;
        a10 := A077510(n) ;
        a10+numtheory[pi](a10) ;
    end proc:
    seq(A076757(n),n=1..40) ; # R. J. Mathar, Nov 19 2011
  • Mathematica
    Select[Table[n + PrimePi[n], {n, 500}], PrimeQ] (* T. D. Noe, Nov 19 2011 *)

Formula

a(n) = k+A000720(k) where k=A077510(n). - R. J. Mathar, Nov 19 2011

Extensions

Name edited by Michel Marcus, Dec 30 2013

A073946 Squares k such that k + pi(k) is a prime.

Original entry on oeis.org

9, 36, 81, 121, 361, 625, 961, 3136, 6724, 8281, 9604, 10609, 12996, 13225, 19881, 25281, 38025, 39204, 40000, 43264, 44944, 45796, 47961, 60516, 64009, 79524, 80089, 80656, 83521, 86436, 90000, 93636, 103684, 117649, 121801, 129600
Offset: 1

Views

Author

David Garber, Nov 13 2002

Keywords

Examples

			a(1)=9, since 9 is a square, pi(9)=4 and 9+4=13 is a prime.
		

Crossrefs

This sequence is a subsequence of sequence A077510. The corresponding sequence of primes is A113943 and the square roots of the original sequence is A113944.

Programs

  • Maple
    select(t -> isprime(t + numtheory:-pi(t)), [seq(i^2,i=1..1000)]); # Robert Israel, Mar 21 2017
  • Mathematica
    Select[Range[1000]^2, PrimeQ[# + PrimePi[#]] &] (* Indranil Ghosh, Mar 21 2017 *)
  • PARI
    v=vector(1000);
    for(n=1, 1000, v[n] = n^2);
    for(n=1, 1000, if(isprime(v[n] + primepi(v[n])), print1(v[n],", "))) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    from sympy import primepi, isprime
    N = (x**2 for x in range(1, 1001))
    print([n for n in N if isprime(n + primepi(n))]) # Indranil Ghosh, Mar 21 2017

A073945 Numbers n such that n + pi(n) is a square.

Original entry on oeis.org

0, 1, 6, 11, 18, 27, 37, 49, 63, 114, 159, 183, 210, 238, 268, 299, 333, 368, 405, 443, 484, 526, 571, 663, 714, 765, 820, 874, 931, 990, 1049, 1110, 1176, 1241, 1307, 1380, 1451, 1523, 1598, 1673, 1834, 1916, 2001, 2174, 2266, 2355, 2544, 2643, 2737, 2837
Offset: 1

Views

Author

David Garber, Nov 13 2002

Keywords

Comments

The corresponding sequence of squares is: 0,1,9,16,25,36,49,64,81,144,196,225,256,289,324,361,400,441,484,529,576,625,676,784,841,900,961,1024,1089,1156,1225,1296,1369,1444,1521,1600,1681,1764,1849,1936,... and the sequence of their square roots is: 0,1,3,4,5,6,7,8,9,12,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,68,69,70,....

Examples

			Since pi(6)=3 and 6+3=9 is a square, so 6 belongs to the sequence.
		

Crossrefs

Programs

  • Maple
    q:= n-> issqr(n+numtheory[pi](n)):
    select(q, [$0..3000])[];  # Alois P. Heinz, Oct 27 2021
  • Mathematica
    Select[Range[0,3000],IntegerQ[Sqrt[#+PrimePi[#]]]&] (* Harvey P. Dale, Feb 01 2014 *)
  • PARI
    isok(n) = issquare(n + primepi(n)); \\ Michel Marcus, Feb 01 2014

Extensions

I put "more" to indicate that the two subsidiary sequences should be detached and made into separate sequences. - N. J. A. Sloane.
Offset changed and terms prepended by Harvey P. Dale and Michel Marcus, Feb 01 2014
Offset 1 from Alois P. Heinz, Oct 27 2021

A228828 Numbers n such that n^2 + pi(n) is prime.

Original entry on oeis.org

2, 3, 7, 12, 18, 21, 36, 37, 42, 45, 52, 55, 60, 61, 65, 68, 70, 79, 84, 95, 98, 113, 130, 135, 143, 145, 155, 180, 181, 185, 195, 205, 216, 222, 231, 239, 253, 262, 273, 275, 325, 332, 334, 354, 368, 370, 385, 402, 417, 421, 432, 433, 454, 462, 488, 505, 516
Offset: 1

Views

Author

K. D. Bajpai, Sep 04 2013

Keywords

Comments

Conjecture: the sequence is infinite.

Examples

			a(6) = 21 :  n^2+pi(n ) = 21^2 + pi(21) = 441+8 = 449 which is a prime.
		

Crossrefs

Cf. A077510 (numbers n such that n + pi(n) is a prime).

Programs

  • Maple
    with(numtheory): KD:= proc() local a;  a:= n^2+pi(n); if isprime(a) then RETURN(n): fi; end: seq(KD(), n=1..2000);
  • Mathematica
    Select[Range[600],PrimeQ[#^2+PrimePi[#]]&] (* Harvey P. Dale, Jul 04 2018 *)
  • PARI
    v=List(); p=0; for(n=2,1e4,p+=isprime(n); if(isprime(n^2+p), listput(v, n))); Vec(v) \\ Charles R Greathouse IV, Sep 04 2013
Showing 1-4 of 4 results.