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

A133395 Terms in A061725 that are of form 3*prime.

Original entry on oeis.org

6, 51, 123, 291, 843, 1371, 1851, 2811, 5331, 6243, 6891, 9411, 18771, 36483, 54291, 63003, 69171, 72363, 73443, 76731, 78963, 128883, 143643, 151323, 187491, 212523, 229443, 271443, 292683, 332931, 361203, 398163, 418611, 458331, 477483, 516963
Offset: 1

Views

Author

Zak Seidov, Dec 22 2007

Keywords

Comments

3|p^2+2 for all p except 3 hence 3|A061725(n) for all n except n=2. If p^2+2 is semiprime it is of form 3*prime.

Crossrefs

Cf. A061725 (p^2+2 where p=prime).

Programs

  • PARI
    lista(nn) = {vec = vector(nn, i, prime(i)^2 + 2); pp = select(i->((bigomega(i) == 2) && !(i % 3)), vec); print(pp);} \\ Michel Marcus, Oct 13 2013

Extensions

Typo in Comment corrected by Shai Covo (green355(AT)netvision.net.il), Oct 11 2010

A062326 Primes p such that p^2 - 2 is also prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 29, 37, 43, 47, 61, 71, 89, 103, 107, 127, 131, 139, 173, 191, 211, 223, 233, 239, 257, 293, 313, 337, 359, 421, 443, 449, 467, 491, 523, 541, 569, 587, 607, 653, 677, 719, 727, 733, 743, 751, 757, 761, 797, 811, 863, 881, 1013, 1021
Offset: 1

Views

Author

Reiner Martin, Jul 12 2001

Keywords

Comments

When p and p^2 - 2 are both prime, the fundamental solution of the Pell equation x^2 - n*y^2 = 1, for n = p^2 - 2, is x = p^2 - 1 and y = p. See A109748 for the case of n and x both prime. - T. D. Noe, May 19 2007
3 is the only prime p such that p^2 + 2 and p^2 - 2 are both primes. - Jaroslav Krizek, Nov 25 2013 (note that p^2 + 2 is composite for all primes p >= 5. - Joerg Arndt, Jan 10 2015)
For all primes p except for p = 3, p^2 + 2 is multiple of 3 (see A061725). - Zak Seidov, Feb 19 2015

Crossrefs

Cf. A049002 (p^2-2).

Programs

  • Haskell
    import Data.List (elemIndices)
    a062326 = a000040 . a137291
    a062326_list = map (a000040 . (+ 1)) $
                   elemIndices 1 $ map a010051' a049001_list
    -- Reinhard Zumkeller, Jul 30 2015
  • Magma
    [ p: p in PrimesUpTo(1100) | IsPrime(p^2-2) ]; // Klaus Brockhaus, Jan 01 2009
    
  • Mathematica
    Select[Prime[Range[500]], PrimeQ[#^2 - 2] &] (* Harvey P. Dale, Sep 20 2011 *)
  • PARI
    { n=0; forprime (p=2, 5*10^5, if (isprime(p^2 - 2), write("b062326.txt", n++, " ", p); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 05 2009
    

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

Original entry on oeis.org

1, 6, 22, 46, 118, 166, 286, 358, 526, 838, 958, 1366, 1678, 1846, 2206, 2806, 3478, 3718, 4486, 5038, 5326, 6238, 6886, 7918, 9406, 10198, 10606, 11446, 11878, 12766, 16126, 17158, 18766, 19318, 22198, 22798, 24646, 26566, 27886, 29926, 32038, 32758, 36478
Offset: 1

Views

Author

Bruno Berselli, Apr 17 2012

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n)^2-3: n in [1..43]];
  • Maple
    A182200:=n->ithprime(n)^2-3; seq(A182200(k),k=1..50); # Wesley Ivan Hurt, Oct 11 2013
  • Mathematica
    Table[Prime[n]^2 - 3, {n, 43}]

Formula

a(n) = A061725(n)-5 = A066872(n)-4 = A001248(n)-3 = A084920(n)-2 = A049001(n)-1 = A166010(n)+1. [Formulas revised and extended by Bruno Berselli, Oct 15 2012]

A097058 Numbers of the form p^2 + 2^p for p prime.

Original entry on oeis.org

8, 17, 57, 177, 2169, 8361, 131361, 524649, 8389137, 536871753, 2147484609, 137438954841, 2199023257233, 8796093024057, 140737488357537, 9007199254743801, 576460752303426969, 2305843009213697673, 147573952589676417417, 2361183241434822611889
Offset: 1

Views

Author

Parthasarathy Nambi, Sep 15 2004

Keywords

Comments

For any n>=3, a(n) is divisible by 3. This follows from the following simple result, combined with the fact that A061725(n), n>=3, is divisible by 3: Let r>=5 be an odd integer such that r^2 + 2 is divisible by 3. Then r^2 + 2^i is divisible by 3 for any odd integer i>=3. In particular, r^2 + 2^r is divisible by 3. This contribution was inspired by Problem of the Month - Math Central, MP98 (problem for October 2010), which asks for all primes p such that 2^p + p^2 is also a prime. - Shai Covo (green355(AT)netvision.net.il), Nov 02 2010

Examples

			For example, the first two terms are 2^2 + 2^2 = 8, 3^2 + 2^3 = 17
		

Programs

  • Maple
    a:= proc(n) local p; p:= ithprime(n); p^2+2^p end:
    seq(a(n), n=1..25);  # Alois P. Heinz, May 15 2013
  • Mathematica
    Table[ Prime[n]^2 + 2^Prime[n], {n, 16}] (* Robert G. Wilson v, Sep 15 2004 *)
    #^2+2^#&/@Prime[Range[20]] (* Harvey P. Dale, Jul 12 2011 *)
  • PARI
    forprime(p=2,61,print1(p^2+2^p,",")) \\ Klaus Brockhaus

Extensions

More terms from Klaus Brockhaus, Ray Chandler and Robert G. Wilson v, Sep 15 2004

A257567 a(n) is the largest exponent k such that 3^k divides (prime(n)^2 + 2).

Original entry on oeis.org

1, 0, 3, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 3, 1, 2, 1, 2, 2, 1, 3, 1, 3, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 1, 4, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 2
Offset: 1

Views

Author

Zak Seidov, Apr 30 2015

Keywords

Comments

Except for n=2, all a(n) > 1 because (prime(n)^2 + 2) is divisible by 3.

Examples

			a(1) = 1 because p=prime(1)=2 and p^2 + 2 =  6 = 3^1*2,
a(2) = 0 because p=prime(2)=3 and p^2 + 2 = 11 = 3^0*11,
a(3) = 3 because p=prime(3)=5 and p^2 + 2 = 27 = 3^3.
		

Crossrefs

Cf. A007949 (3-adic valuation), A061725 (p^2+2, with p prime), A257568.

Programs

  • Mathematica
    Table[IntegerExponent[Prime[k]^2 + 2, 3], {k, 100}]
  • PARI
    a(n) = valuation(prime(n)^2+2, 3); \\ Michel Marcus, May 01 2015

Formula

a(n) = A007949(A061725(n)). - Michel Marcus, May 01 2015
Showing 1-5 of 5 results.