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

A347194 Numbers such that the two adjacent integers are a prime and the square of another prime.

Original entry on oeis.org

8, 10, 24, 48, 168, 360, 840, 1368, 1848, 2208, 3720, 5040, 7920, 10608, 11448, 16128, 17160, 19320, 29928, 36480, 44520, 49728, 54288, 57120, 66048, 85848, 97968, 113568, 128880, 177240, 196248, 201600, 218088, 241080, 273528, 292680, 323760, 344568, 368448, 426408, 458328, 516960, 528528, 537288, 552048, 564000, 573048, 579120
Offset: 1

Views

Author

Bernard Schott, Sep 23 2021

Keywords

Comments

-> Equivalently, numbers k such that tau(k^2-1) = A347191(k) = 6 (see example; used for Maple code).
Proof: tau(k^2-1) = 6 <==> k^2-1 = p^5 or k^2-1 = p*q^2 with p <> q primes; but k^2-p^5 = 1 is impossible, as a consequence of the Catalan-Mihăilescu theorem; now, (k-1)*(k+1) = p*q^2 ==> (k-1 = p and k+1 = q^2) or (k-1 = q^2 and k+1 = p), because k-1 = q and k+1 = p*q is not possible, otherwise 2 = q*(p-1), which would contradict p <> q.
-> There are two possible configurations with p, q primes: (q^2 < a(n) < p) or (p < a(n) < q^2).
The unique configuration q^2 < a(n) < p is for q = 3, a(2) = 10 and p = 11.
All the other configurations, for n = 1 or n >= 3, are of the form p < a(n) < q^2 with p = A049002(n) and q = A062326(n).
-> Note that there is only one integer such that the two adjacent integers are a prime and the square of that prime: it is 3, which lies between 2 and 2^2; in this case, tau(3^2-1) = 4.

Examples

			8 is a term since 8 lies between 7 (prime) and 9 = 3^2 (square of prime); also tau(8^2-1) = tau(63) = 6.
10 is a term since 10 lies between 9 = 3^2 (square of prime) and 11 (prime); also tau(10^2-1) = tau(99) = 6.
24 is a term since 24 lies between 23 (prime) and 25 = 5^2 (square of prime); also tau(24^2-1) = tau(575) = 6.
		

Crossrefs

Subsequence of A163492 (between prime and a perfect square).

Programs

  • Maple
    with(numtheory):
    filter := q-> tau(q^2-1) = 6 : select(filter, [$2..580000]);
  • Mathematica
    q[n_] := Module[{e1 = FactorInteger[n - 1][[;; , 2]], e2 = FactorInteger[n + 1][[;; , 2]]}, (e1 == {1} && e2 == {2}) || (e1 == {2} && e2 == {1})]; Select[Range[4, 600000], q] (* Amiram Eldar, Sep 23 2021 *)
  • PARI
    isok(m) = my(pa, pb); (isprimepower(m-1, &pa)*isprimepower(m+1, &pb) == 2) && (pa != pb); \\ Michel Marcus, Sep 23 2021
    
  • PARI
    upto(n) = { my(res = List()); forprime(i = 3, sqrtint(n-1), if(isprime(i^2 - 2), listput(res, i^2-1); ); if(isprime(i^2 + 2), listput(res, i^2 + 1); ) ); res } \\ David A. Corneth, Sep 23 2021

Formula

For n >= 3: a(n) = A049002(n) + 1 = a(n) = A146981(n) - 1 = (A049002(n) + A146981(n))/2 = A062326(n)^2 - 1.

A329582 Numbers between a power and a prime.

Original entry on oeis.org

1, 2, 3, 8, 10, 24, 28, 48, 80, 82, 126, 168, 224, 226, 242, 360, 440, 442, 728, 840, 1088, 1090, 1224, 1368, 1522, 1848, 2026, 2208, 2400, 3024, 3250, 3374, 3720, 3968, 4760, 5040, 5624, 5928, 6562, 6858, 7920, 8648, 9802, 10608, 11026, 11448, 12322, 13688, 13690, 14160, 14640, 15130, 16128, 17160
Offset: 1

Views

Author

S. Brunner, Nov 17 2019

Keywords

Comments

All numbers k where k - 1 is any power with exponent greater than or equal to 2 and k + 1 is a prime number, or vice versa.
If only perfect powers other than 0 and 1 were allowed, then this sequence would start with 3.
All terms greater than 3 are even and follow or precede an odd power.

Examples

			The first 20 terms with their neighbors:
   n  k-1  k k+1      |       n  k-1  k   k+1
   1  0^2  1   2      |      11  5^3 126  127
   2  1^2  2   3      |      12  167 168 13^2
   3    2  3 2^2      |      13  223 224 15^2
   4    7  8 3^2      |      14 15^2 226  227
   5  3^2 10  11      |      15  241 242  3^5
   6   23 24 5^2      |      16  359 360 19^2
   7  3^3 28  29      |      17  439 440 21^2
   8   47 48 7^2      |      18 21^2 442  443
   9   79 80 3^4      |      19  727 728  3^6
  10  3^4 82  83      |      20  839 840 29^2
		

Crossrefs

Programs

  • PARI
    isok(k) = (k==1) || (k==2) || (ispower(k-1) && isprime(k+1)) || (isprime(k-1) && ispower(k+1)); \\ Michel Marcus, Nov 18 2019

A329595 Numbers k such that either (a) k-1=i^m for some i and m >= 3 and k+1 is a prime, or (b) k-1 is a prime and k+1 = i^m for some i and m >= 3.

Original entry on oeis.org

1, 2, 28, 80, 82, 126, 242, 728, 2400, 3374, 6562, 6858, 14640, 19682, 24390, 28560, 29790, 50626, 50652, 59050, 91126, 161052, 194480, 194482, 250048, 274626, 300762, 328510, 357912, 371292, 571788, 707280, 753570, 759376, 823542, 970298, 1157626, 1295028, 1442898, 1771560, 1860868, 2146688, 2146690
Offset: 1

Views

Author

S. Brunner, Nov 17 2019

Keywords

Comments

If 0 or 1 are not counted as powers, then this sequence starts with 28.
All terms other than 1 are even and follow or precede an odd power.

Examples

			The first 20 terms with their neighbors:
   n  k-1   k   k+1      |       n   k-1    k    k+1
   1  0^3    1    2      |      11   3^8  6562  6563
   2  1^3    2    3      |      12  6857  6858  19^3
   3  3^3   28   29      |      13 14639 14640  11^4
   4   79   80  3^4      |      14 19681 19682   3^9
   5  3^4   82   83      |      15  29^3 24390 24391
   6  5^3  126  127      |      16 28559 28560  13^4
   7  241  242  3^5      |      17 29789 29790  31^3
   8  727  728  3^6      |      18  15^4 50626 50627
   9 2399 2400  7^4      |      19 50651 50652  37^3
  10 3373 3374 15^3      |      20  3^10 59050 59051
		

Crossrefs

Programs

  • Mathematica
    {1, 2}~Join~Flatten@ Map[Which[AllTrue[{#2, #3}, # > 2 &], #1 + {-1, 1}, #2 > 2, #1 - 1, #3 > 2, #1 + 1, True, Nothing] & @@ Prepend[Map[GCD @@ FactorInteger[#][[All, -1]] &, {# - 2, # + 2}], #] &, Prime@ Range[160000]] (* Michael De Vlieger, Dec 27 2019 *)
  • PARI
    isok(k) = (k==1) || (k==2) || ((ispower(k-1) >= 3) && isprime(k+1)) || (isprime(k-1) && (ispower(k+1) >= 3)); \\ Michel Marcus, Nov 18 2019

A163628 Integers such that the two adjacent integers are a prime and three times a prime.

Original entry on oeis.org

8, 10, 14, 16, 20, 22, 32, 38, 40, 52, 58, 68, 70, 88, 110, 112, 128, 130, 140, 158, 178, 182, 200, 212, 238, 250, 268, 292, 308, 310, 338, 380, 382, 410, 418, 448, 488, 490, 500, 502, 520, 542, 572, 578, 592, 598, 632, 682, 700, 718, 752, 770, 772, 788, 808
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 02 2009

Keywords

Comments

Union[3*A023208 + 1, 3*A088878 - 1]. [Zak Seidov, Aug 07 2009]

Examples

			a(1)=8 which lies between 7=A000040(4) and 9 = A001748(2).
a(2)=10 which lies between 9=A001748(2) and 11 = A000040(5).
		

Crossrefs

Programs

Extensions

Many terms like 44, 46, 62 etc. removed by R. J. Mathar, Aug 06 2009

A163629 Numbers such that the two adjacent integers are a prime and 5 times a prime.

Original entry on oeis.org

14, 16, 24, 36, 54, 66, 84, 96, 114, 156, 234, 264, 294, 306, 336, 354, 366, 396, 444, 486, 504, 546, 564, 654, 684, 744, 756, 786, 864, 906, 954, 966, 984, 996, 1116, 1164, 1194, 1284, 1554, 1566, 1584, 1656, 1734, 1746, 1866, 1914, 1986, 2004, 2154, 2214
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 02 2009

Keywords

Examples

			a(1)=14 which lies between 13=A000040(6) and 15=A001750(2).
a(2)=16 which lies between 15=A001750(2) and 17=A000040(7).
		

Crossrefs

Programs

  • Mathematica
    prQ[n_]:=Module[{a=n-1,b=n+1},(PrimeQ[a]&&PrimeQ[b/5])||(PrimeQ[b] && PrimeQ[a/5])]; Select[Range[3000],prQ] (* Harvey P. Dale, Jun 05 2012 *)

Extensions

114, 444 added, 1303 removed, 1666 replaced by 1656 - R. J. Mathar, Aug 07 2009

A163630 Numbers such that the two adjacent integers are a prime and 7 times a prime.

Original entry on oeis.org

20, 22, 36, 48, 78, 90, 132, 162, 258, 330, 372, 468, 498, 510, 678, 708, 720, 750, 762, 888, 918, 972, 1098, 1170, 1212, 1380, 1560, 1602, 1758, 1800, 1980, 2052, 2178, 2220, 2358, 2442, 2472, 2610, 2682, 2778, 2862
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 02 2009

Keywords

Examples

			a(2)=22 lies between 21=7*A000040(2) and 23=A000040(9).
a(3)=36 lies between 35=7*A000040(3) and 37=A000040(12).
		

Crossrefs

Programs

  • Mathematica
    prQ[n_] := Module[{a = n - 1, b = n + 1}, (PrimeQ[a] && PrimeQ[b/7]) || (PrimeQ[b] && PrimeQ[a/7])]; Select[Range[5000], prQ] (* G. C. Greubel, Jul 30 2017 *)

Extensions

20 inserted, 62 removed, 90 added etc. by R. J. Mathar, Aug 07 2009
Showing 1-6 of 6 results.