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.

A306247 Numbers k such that 2k - p is not a prime where p is any prime divisor of 4k^2 - 1.

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 15, 19, 21, 26, 29, 30, 34, 36, 40, 48, 49, 51, 54, 61, 63, 64, 69, 74, 75, 79, 82, 84, 86, 89, 90, 95, 96, 99, 103, 106, 110, 111, 112, 114, 119, 120, 135, 139, 141, 146, 147, 149, 151, 152, 153, 154, 156, 161, 166, 169, 173, 174, 179, 180, 184, 186, 187, 190, 194
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 31 2019

Keywords

Comments

Primes in a(n): 2, 3, 19, 29, 61, 79, 89, 103, 139, 149, 151, 173, 179, ...

Examples

			1 is a term because 4*1^2 - 1 = 3 and 2*1 - 3 = -1 (nonprime);
2 is a term because 4*2^2 - 1 = 15 and 2*2 - 15 = -11 (nonprime);
3 is a term because 4*3^2 - 1 = 35 and 2*3 - 35 = -29 (nonprime);
6 is a term because 4*6^2 - 1 = 143 = 11*13 and 2*6 - 11 = 1 (nonprime), 2*6 - 13 = -1 (nonprime);
9 is a term because 4*9^2 - 1 = 323 = 17*19 and 2*9 - 17 = 1 (nonprime), 2*9 - 19 = -1 (nonprime).
		

Crossrefs

Includes A040040.
Cf. A306261.

Programs

  • Maple
    filter:= proc(n) andmap(`not` @ isprime, map(p -> 2*n-p, numtheory:-factorset(4*n^2-1))) end proc:
    select(filter, [$1..300]); # Robert Israel, Jan 31 2019
  • Mathematica
    Select[Range@ 200, AllTrue[2 # - FactorInteger[4 #^2 - 1][[All, 1]], ! PrimeQ@ # &] &] (* Michael De Vlieger, Feb 03 2019 *)
  • PARI
    isok(k) = {my(pf = factor(4*k^2-1)[,1]); #select(x->isprime(2*k-x), pf) == 0;} \\ Michel Marcus, Mar 02 2019

Formula

A306261(a(n)) > 1 for n >= 4.

A306196 Irregular triangle read by rows where row n lists the primes 2n - k, with 1 < k < 2n-1, and if k is composite also 2n - p has to be prime for some prime divisor p of k.

Original entry on oeis.org

2, 3, 2, 3, 5, 3, 5, 7, 2, 5, 7, 2, 3, 5, 7, 11, 3, 5, 7, 11, 13, 3, 5, 7, 11, 13, 2, 3, 5, 7, 11, 13, 17, 2, 3, 5, 7, 11, 13, 17, 19, 2, 3, 5, 7, 11, 13, 17, 19, 2, 3, 5, 7, 11, 13, 17, 19, 23, 3, 5, 11, 13, 17, 23, 2, 7, 11, 13, 17, 19, 23, 2, 3, 5, 11, 13, 17, 19, 23, 29
Offset: 2

Views

Author

Juri-Stepan Gerasimov, Jan 28 2019

Keywords

Comments

Conjectures:
(i) 1 <= A035026(n) <= (n-th row length of this triangle) for n >= 2;
(ii) a(n,1) < A171637(n,1) for n >= 4.
Numbers m such that m-th row length of this triangle is equal to A000720(m): 1, 2, 11, 13, 25, 56, 60, ...

Examples

			Row 2 = [2] because 2*2 = 2 + 2;
Row 3 = [3] because 2*3 = 3 + 3;
Row 4 = [2,3,5] because 2*4 - 2 = 6 = 2*3 and 2*4 = 3 + 5;
Row 5 = [3,5,7] because 2*5 = 3 + 7 = 5 + 5.
The table starts:
  2;
  3;
  2,  3,  5;
  3,  5,  7;
  2,  5,  7;
  2,  3,  5,  7, 11;
  3,  5,  7, 11, 13;
  3,  5,  7, 11, 13;
  2,  3,  5,  7, 11, 13, 17;
  2,  3,  5,  7, 11, 13, 17, 19;
  2,  3,  5,  7, 11, 13, 17, 19;
  2,  3,  5,  7, 11, 13, 17, 19, 23;
  3,  5, 11, 13, 17, 23;
  2,  7, 11, 13, 17, 19, 23;
  2,  3,  5, 11, 13, 17, 19, 23, 29;
		

Crossrefs

Supersequence of A171637.

Programs

  • PARI
    isok(k,n) = {if (isprime(2*n-k), pf = factor(k)[,1]; for (j=1, #pf, if (isprime(2*n-pf[j]), return (1));););}
    row(n) = {my(v = []); for (k=1, 2*n, if (isok(k,n), v = concat(v, 2*n-k))); vecsort(v);} \\ Michel Marcus, Mar 02 2019

A306615 Least positive k such that 2n - p is prime where p is some prime divisor of n^k - 1, or 0 if no such k exists.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Feb 28 2019

Keywords

Comments

Conjecture: a(n) >= 1 for n >= 4.
Records: a(4) = 1, a(5) = 2, a(19) = 6, a(62) = 10, a(166) = 18, ...
For n >= 4, a(n) < b(n) where b(n) is the smallest m > 1 such that q(2n - q) is some semiprime divisor of n^m - 1, or 0 if no such m exists: 0, 0, 0, 2, 6, 2, 10, 4, 6, 6, 6, 2, 11, 22, 22, 7, 4, 2, 30, 35, 18, 30, 20, 42, 9, 40, 8, 13, 26, 2, 42, 12, 20, 10, 52, 21, 3, 36, 42, 11, 26, 2, 24, 82, 21, 12, 44, 88, 39, 8, 32, 25, 88, 24, 30, 25, 20, 96, 88, 2, 54, 220, 48, 6, ... (from Goldbach's problem).

Examples

			a(4) = 1 because 4^1 - 1 = 3 where 3 is some prime divisor of 3 and 2*4 - 3 = 5 is prime;
a(5) = 2 because 5^2 - 1 = 24 where 3 is some prime divisor of 24 and 2*5 - 3 = 7 is prime.
		

Crossrefs

Cf. A306261.

Programs

  • Mathematica
    Table[If[n < 4, 0, Block[{k = 1}, While[NoneTrue[FactorInteger[n^k - 1][[All, 1]], PrimeQ[2 n - #] &], k++]; k]], {n, 104}] (* Michael De Vlieger, Mar 11 2019 *)
  • PARI
    isok(n,k) = {my(pf=factor(n^k-1, 2*n)[,1]); for (j=1, #pf, if (isprime(2*n-pf[j]), return (1)););}
    a(n) = {if (n < 4, return(0)); my(k=1); while (!isok(n, k), k++); k;} \\ Michel Marcus, Mar 02 2019
Showing 1-3 of 3 results.