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

A367577 a(n) is the first k such that A367566(k) = n, or -1 if no such k exists.

Original entry on oeis.org

252, 1, 2, -1, 24, 5, 48, -1, -1, -1, 450, -1, 12, 15, 4, -1, 1512, -1, 18, -1, -1, 45, 8118, -1, -1, -1, -1, -1, 840, -1, 30, -1, 10, -1, 6, -1, 1368, 189, -1, -1, 1680, -1, 42, -1, -1, 231, 2208, -1, -1, -1, 152, -1, 6942, -1, -1, -1, -1, -1, 27318, -1, 60
Offset: 1

Views

Author

Jon E. Schoenfield, Nov 24 2023

Keywords

Comments

a(n) = -1 iff n is nonsquarefree or is divisible by some term in A367576.

Examples

			a(1) = 252 because 1 first appears as a term in A367566 at A367566(252).
a(4) = -1 because 4 = 2^2 is nonsquarefree so it never appears in A367566.
a(10) = -1 because 10 is a term in A367576.
a(42) = -1 because 21 divides 42, and 21 is a term in A367576.
		

Crossrefs

A239735 Least number k such that n*k^n +/- 1 are twin primes, or a(n) = 0 if no such number exists.

Original entry on oeis.org

4, 3, 4, 1, 570, 1, 1464, 54, 60, 14025, 1932, 1, 7194, 15, 3612, 0, 4746, 1, 540, 150, 7060, 138, 80094, 6160, 33480, 93135, 0, 366618, 26058, 1, 90510, 16836, 9824, 418875, 57246, 0, 182394, 64077, 14178, 943410, 36078, 1, 314520, 15870, 194942, 15044700, 241944, 3871, 308730
Offset: 1

Views

Author

Derek Orr, Mar 30 2014

Keywords

Comments

a(n) = 1 iff n is in A014574.
If a(n) = 0, then n is in A097764.
If a(n) > 1 then A367566(n) divides a(n). - Jon E. Schoenfield, Nov 23 2023

Examples

			1*1^1+1 (2) and 1*1^1-1 (0) are not both prime. 1*2^1+1 (3) and 1*2^1-1 (1) are not both prime. 1*3^1+1 (4) and 1*3^1-1 (2) are not both prime. 1*4^1+1 (5) and 1*4^1-1 (3) are both prime. So, a(1) = 4.
		

Crossrefs

Programs

  • Mathematica
    zeroQ[n_] := Module[{f = FactorInteger[n]}, pow = GCD @@ f[[;; , 2]]; n > 4 && AnyTrue[Divisors[pow], # > 1 && Divisible[n, #] &]];
    a[n_, kmax_] := Module[{k = 1}, If[zeroQ[n], 0, While[k <= kmax && ! And @@ PrimeQ[n*k^n + {-1, 1}], k++]; If[k < kmax, k, -1]]]; Table[a[n, 10^6], {n, 1, 25}] (* Amiram Eldar, Nov 18 2023, returns -1 if the search limit should exceed kmax *)
  • PARI
    bot(n) = for(k=1, 10^5, if(ispseudoprime(n*k^n-1), if(ispseudoprime(n*k^n+1), return(k))));
    n=1; while(n<100, print1(bot(n), ", "); n+=1)
    
  • PARI
    a(n) = if ((n==16) || (n==27) || (n==36) || (n==64) /* || (n== ... */, return(0)); my(k=1); while (!(ispseudoprime(n*k^n-1) && ispseudoprime(n*k^n+1)), k++); k; \\ Michel Marcus, Nov 18 2023

Extensions

a(46) from Giovanni Resta, Mar 31 2014

A367576 Semiprimes p*q such that 2*p divides q-1.

Original entry on oeis.org

10, 21, 26, 34, 39, 55, 57, 58, 74, 82, 93, 106, 111, 122, 129, 146, 155, 178, 183, 194, 201, 202, 203, 205, 218, 219, 226, 237, 253, 274, 291, 298, 301, 305, 309, 314, 327, 346, 355, 362, 381, 386, 394, 417, 453, 458, 466, 471, 482, 489, 497, 505, 514, 538
Offset: 1

Views

Author

Jon E. Schoenfield, Nov 24 2023

Keywords

Comments

These terms and their squarefree proper multiples are the squarefree numbers that never appear as terms in A367566.

Examples

			10 is a term: 10 = 2*5, and 2*2 | 5 - 1.
33 is not a term: 33 = 3*11, but 2*3 does not divide 11 - 1.
		

Crossrefs

Subsequence of A006881.
Showing 1-3 of 3 results.