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 11-18 of 18 results.

A246562 Primes p such that 4+p, 4+p^2, 4+p^3, 4+p^5, and 4+p^7 are all prime.

Original entry on oeis.org

7, 469363, 2552713, 3378103, 6595597, 6629683, 39837517, 46024063, 46167307, 97371007, 97629403, 105528217, 136983307, 169483033, 202953613, 213792193, 216520987, 216738043, 221705647, 304033927, 317502193, 359133553
Offset: 1

Views

Author

Zak Seidov, Aug 29 2014

Keywords

Comments

All terms are == {3, 7} mod 10. Subsequence of A246519.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[193*10^5]],AllTrue[#^{1,2,3,5,7}+4,PrimeQ]&] (* Harvey P. Dale, Sep 07 2024 *)
  • PARI
    forprime(p=1,10^9,if(ispseudoprime(4+p) && ispseudoprime(4+p^2) && ispseudoprime(4+p^3) && ispseudoprime(4+p^5) && ispseudoprime(4+p^7), print1(p,", "))) \\ Derek Orr, Aug 30 2014

A200050 a(2) = 1, then (p-1)*(p-4)/2, with p = prime(n), n > 2.

Original entry on oeis.org

1, 2, 9, 35, 54, 104, 135, 209, 350, 405, 594, 740, 819, 989, 1274, 1595, 1710, 2079, 2345, 2484, 2925, 3239, 3740, 4464, 4850, 5049, 5459, 5670, 6104, 7749, 8255, 9044, 9315, 10730, 11025, 11934, 12879, 13529, 14534, 15575, 15930, 17765, 18144, 18914, 19305
Offset: 2

Views

Author

Arkadiusz Wesolowski, Apr 16 2012

Keywords

Comments

Record values in A192599. The index sequence of this one is 1, 2, 3, 6, 7, 9, 11, 13, 17, 18, 21, 23, 25, 29, 31, 34, 36, 40, 42, 45, 47, 50, 52, 56, 58, 61.

Examples

			A192599(13) = 209 since A192599(17) = 350 is the next record value.
		

Crossrefs

Programs

  • Magma
    [(p-1)*Abs(p-4)/2: p in [NthPrime(n+1): n in [1..45]]]
    
  • Mathematica
    Table[p = Prime[n + 1]; (p - 1)*Abs[p - 4]/2, {n, 45}]
    Join[{1},((#-1)(#-4))/2&/@Prime[Range[3,50]]] (* Harvey P. Dale, Aug 04 2020 *)
  • PARI
    vector(45, n, p=prime(n+1); (p-1)*abs(p-4)/2)

Formula

a(2) = 1, a(n) = A006093(n)*A172367(n-2)/2.

A094069 Prime(p)-4 for primes p such that prime(p) - 4 is prime.

Original entry on oeis.org

7, 13, 37, 79, 349, 397, 457, 613, 769, 1213, 1429, 1783, 2347, 2377, 2473, 3907, 4129, 4513, 4783, 5437, 5647, 7477, 7603, 7879, 8803, 9829, 10429, 10453, 10627, 11443, 11863, 11923, 12109, 13033, 13099, 13327, 14173, 14779, 15679, 16057, 16069
Offset: 1

Views

Author

Cino Hilliard, May 31 2004

Keywords

Comments

Primes q such that q+4 is in A006450. - Robert Israel, Nov 09 2020

Examples

			Prime(13) = 41. 41 - 4 = 37.
		

Crossrefs

Cf. A006450.
This is a subsequence of A172367.

Programs

  • Maple
    R:= NULL: p:= 7:
    for i from 5 to 10000 do
      q:= p; p:= nextprime(p);
      if isprime(i) and q=p-4 then R:= R, q fi;
    od:
    R; # Robert Israel, Nov 09 2020
  • Mathematica
    Prime[#]&/@Select[Prime[Range[2,300]],PrimeQ[Prime[#]-4]&]-4 (* Harvey P. Dale, May 21 2021 *)
  • PARI
    a(n) = { forprime(x=2,n, y=prime(x)- 4; if(isprime(y),print1(y",")) ) }

Extensions

Definition corrected by Robert Israel, Nov 09 2020

A157678 Numbers k such that k + floor(average of digits of k) is prime.

Original entry on oeis.org

1, 12, 16, 27, 30, 34, 38, 41, 56, 63, 67, 70, 74, 89, 92, 96, 101, 102, 105, 107, 112, 125, 128, 130, 136, 146, 147, 154, 161, 164, 168, 175, 186, 188, 190, 193, 208, 210, 219, 226, 229, 231, 236, 237, 247, 254, 258, 265, 273, 276, 278, 280, 290, 305, 308, 309
Offset: 1

Views

Author

Kyle D. Balliet, Mar 04 2009

Keywords

Examples

			n = 89 -> 89 + floor((8+9)/2) = 89 + 8 = 97 (prime).
n = 190 -> 190 + floor((1+9+0)/3) = 190 + 3 = 193 (prime).
		

Crossrefs

Cf. A172367.

Programs

  • Maple
    a := proc (n) local nn: nn := convert(n, base, 10): if isprime(n+floor(add(nn[j], j = 1 .. nops(nn))/nops(nn))) = true then n else end if end proc: seq(a(n), n = 1 .. 350); # Emeric Deutsch, Mar 07 2009
  • PARI
    is(n)=isprime(sumdigits(n)\#digits(n)+n) \\ Charles R Greathouse IV, Dec 27 2013

Extensions

Corrected and extended by Emeric Deutsch, Mar 07 2009

A243095 Least integer m > 1 such that 4 + m^n is prime or 1 if only 4 + 1^n is prime.

Original entry on oeis.org

3, 3, 3, 1, 7, 3, 7, 1, 3, 3, 9, 1, 33, 7, 9, 1, 43, 17, 27, 1, 9, 3, 7, 1, 55, 47, 285, 1, 27, 3, 39, 1, 43, 117, 163, 1, 63, 255, 15, 1, 87, 3, 43, 1, 187, 77, 37, 1, 105, 45, 25, 1, 99, 305, 79, 1, 3, 27, 903, 1, 127, 293, 255, 1, 27, 27, 435, 1, 207, 143, 127, 1, 117, 295, 1159, 1, 477
Offset: 1

Views

Author

Zak Seidov, Aug 29 2014

Keywords

Comments

If n is a multiple of 4 then 4 + m^n is prime iff m = 1.
4 + m^(4*x) = (m^(2*x)-2*m^x+2) * (m^(2*x)+2*m^x+2). - Jens Kruse Andersen, Sep 02 2014

Crossrefs

Programs

  • PARI
    a(n)=if(n%4==0,return(1));m=2;while(!ispseudoprime(4+m^n),m++);return(m)
    vector(100,n,a(n)) \\ Derek Orr, Aug 29 2014

A275115 Least prime of the form x^2 + n*y^2 with x>0 and y>0.

Original entry on oeis.org

2, 3, 7, 5, 29, 7, 11, 17, 13, 11, 47, 13, 17, 23, 19, 17, 53, 19, 23, 29, 37, 23, 59, 73, 29, 107, 31, 29, 173, 31, 47, 41, 37, 43, 71, 37, 41, 47, 43, 41, 173, 43, 47, 53, 61, 47, 83, 73, 53, 59, 67, 53, 89, 79, 59, 137, 61, 59, 317, 61, 97, 71, 67, 73, 101, 67, 71, 149, 73, 71
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, Jul 17 2016

Keywords

Comments

Neither x nor y can be zero because the remaining part of the form would then be composite.
a(n) > n.
The differences, d, between a(n) and n are 1, 4, 9, 16, 24, 25, 36, 49, 64, 81, 100, 121, 132, 144, 169, 196, 225, 256, 258, 289, 324, 361, 400, 441, ..., .
Not all 'd's are squares, such as 24, 132, 258, 1032, 1167, 1518, 2103, 2472, 2652, 2706, 5793. It is conjectured that this list is complete.
d=1 for A006093;
d=4 for A172367;
d=9 for n: 8, 14, 20, 32, 34, 38, 44, 50, 62, 64, 74, 80, 92, 94, 98, 104, 118, 122, 128, 140, 142, 154, 158, ..., ;
d=16 for n: 21, 31, 45, 51, 73, 81, 87, 91, 111, 115, 121, 141, 151, 157, 165, 181, 183, 211, 213, 217, 241, ..., ;
d=25 for n: 48, 54, 76, 84, 114, 124, 132, 168, 174, 186, 204, 208, 216, 244, 246, 252, 258, 286, 288, 324, ..., ;
d=36 for n: 11, 17, 23, 35, 47, 53, 61, 65, 71, 77, 95, 101, 113, 131, 137, 143, 155, 161, 191, 197, 203, 205, ..., ;
d=49 for n: 24, 90, 144, 234, 264, 300, 318, 360, 390, 450, 472, 492, 528, 550, 558, 564, 624, 670, 678, 712, ..., ;
and for the nonsquare differences of 24, 132, 258, 1032, 1167, 1518, 2103, 2472, 2652, 2706 and 5793l, their n's are 5, 41, 59, 341, 314, 479, 626, 749, 881, 755 and 1784, respectively.
Least n that has as its difference k^2: 1, 3, 8, 21, 48, 11, 24, 117, 26, 139, 120, 29, 294, 201, 134, 621, 468, 179, 792, 1269, 356, 1249, 754, 251, 696, ..., .

Examples

			a(1) = 2 since it equals 1^2+1*1^2;
a(2) = 3 since it equals 1^2+2*1^2;
a(3) = 7 since it equals 2^2+3*1^2;
a(4) = 5 since it equals 1^2+4*1^2;
a(5) = 29 since it equals 3^2+5*2^2; etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = NextPrime@ n, y}, While[y = 1; While[p > n*y^2 && !IntegerQ[ Sqrt[p - n*y^2]], y++]; !IntegerQ[ Sqrt[p - n*y^2]], p = NextPrime@ p]; p]; Array[f, 70]
  • PARI
    a(n)=if(n==1, return(2)); my(best,x=1+n%2,t); while(!isprime(best=x^2+n), x += 2); for(y=2,sqrtint((best-2)\n), t=best-n*y^2; if(t<1, return(best)); for(x=1,sqrtint(t), if(isprime(t=x^2+n*y^2) && tCharles R Greathouse IV, Jul 17 2016

Formula

a(n-1) = n iff n is prime.

A227280 Values of the difference d for 12 primes in geometric-arithmetic progression with the minimal sequence {13*13^j + j*d}, j = 0 to 11.

Original entry on oeis.org

81647160420, 170655787050, 211212209880, 227961624450
Offset: 1

Views

Author

Sameen Ahmed Khan, Jul 05 2013

Keywords

Comments

Primality requires d to be multiple of 7# = 2*3*5*7 = 210.
Fifth term is > (1600*10^6)*(210) = 336000000000.

Examples

			d = 170655787050 then {13*13^j + j*d}, j = 0 to 11, is {13, 170655787219, 341311576297, 511967389711, 682623519493, 853283762059, 1023997470817, 1195406240071, 1375850795773, 1673760575299, 3498718264537, 25175298780031}, which is 12 primes in geometric-arithmetic progression.
		

Crossrefs

Programs

  • Mathematica
    Clear[p]; p = 13; gapset12d = {}; Do[If[PrimeQ[{p, p*p + d, p*p^2 + 2*d, p*p^3 + 3*d, p*p^4 + 4*d, p*p^5 + 5*d, p*p^6 + 6*d, p*p^7 + 7*d, p*p^8 + 8*d, p*p^9 + 9*d, p*p^10 + 10*d, p*p^11 + 11*d}] == {True, True, True, True, True, True, True, True, True, True, True, True}, AppendTo[gapset12d, d]], {d, 2, 10^11, 2}]; gapset12d

A303811 Least k such that A006666(k)/A006667(k) = prime(n).

Original entry on oeis.org

159, 6, 10, 40, 640, 2560, 40960, 163840, 2621440, 167772160, 671088640, 42949672960, 687194767360, 2748779069440, 43980465111040, 2814749767106560, 180143985094819840, 720575940379279360, 46116860184273879040, 737869762948382064640, 2951479051793528258560
Offset: 1

Views

Author

Michel Lagneau, Sep 10 2018

Keywords

Comments

A006666 and A006667 are respectively the number of halving and tripling steps in the '3x+1' problem.
For n > 2, it seems that a(n) is of the form a(n) = 5*2^q with q = 1, 3, 7, 9, 13, 15, 19, 25, 27, 33, 37, 39, 43, 49, 55, 57, 63, 67, 69, ... (Numbers q such that q+4 is prime: A172367)

Examples

			a(4) = 40 because A006666(40)/A006667(40) = 7/1 = prime(4).
		

Crossrefs

Programs

  • Maple
    nn:=10^20:
    for n from 1 to 10 do:
    ii:=0:
       for k from 1 to nn while(ii=0) do:
        it0:=0:it1:=0:m:=k:
          for i from 1 to nn while(m<>1) do:
            if irem(m, 2)=0
             then
             m:=m/2:it0:=it0+1:
             else
             m:=3*m+1:it1:=it1+1:
           fi:
         od:
          if it1<>0 and it0/it1 = ithprime(n)
           then
           ii:=1:printf(`%d %d \n`,n,k):
           else
         fi:
    od:
    od:
Previous Showing 11-18 of 18 results.