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.

A258780 a(n) is the least k such that k^2 + 1 is a semiprime p*q, p < q, and (q - p)/2^n is prime.

This page as a plain text file.
%I A258780 #32 Nov 10 2019 03:07:05
%S A258780 8,12,140,64,2236,196,1300,1600,6256,5084,248756,246196,484400,36680,
%T A258780 887884,821836,1559116,104120,126072244,9586736,4156840,542759984,
%U A258780 1017981724,2744780140,405793096,148647496,1671024916
%N A258780 a(n) is the least k such that k^2 + 1 is a semiprime p*q, p < q, and (q - p)/2^n is prime.
%C A258780 The corresponding primes are 2, 3, 71, 7, 1069, 7, 5, 5, 59, 2, 368471, 180463, 12421, 2, 29, 125683, 226169, 5, 369704891, 197, 5, 263, 7444559, 239621423, 594271, 2, 474359, ...
%C A258780 All terms are even, in order for k^2+1 to be odd. Otherwise, with k^2+1 being even, p-q would be odd and hence not a multiple of 2^n. - _Michel Marcus_, Apr 13 2019
%e A258780 a(2)=8 because 8^2+1 = 5*13 and (13-5)/2^2 = 2 is prime. The number 8 is the first term of the sequence 8, 22, 34, 46, 50, 58, ...
%e A258780 a(3)=12 because 12^2+1 = 5*29 and (29-5)/2^3 = 3 is prime. The number 12 is the first term of the sequence 12, 28, 44, 52, 76, 80, ...
%e A258780 a(4)=140 because 140^2+1 = 17*1153 and (1153-17)/2^4 = 71 is prime. The number 140 is the first term of the sequence 140, 296, 404, 604, ...
%t A258780 lst={};Do[k=2;While[!(Plus@@Last/@FactorInteger[k^2+1]==2&&PrimeQ[(FactorInteger[k^2+1][[-1,1]]-FactorInteger[k^2+1][[1,1]])/2^n]),k=k+2];Print[n," ",k],{n,2,19}];lst
%o A258780 (PARI) isok(k, n) = my(kk=k^2+1, f=factor(kk)[,1]~); (bigomega(kk) == 2) && (#f == 2) && (p=f[1]) && (q=f[2]) && (qq=(q-p)/2^n) && !frac(qq) && isprime(qq);
%o A258780 a(n) = my(k=2); while (!isok(k,n), k+=2); k; \\ _Michel Marcus_, Apr 13 2019
%Y A258780 Cf. A085722, A144255.
%K A258780 nonn,more
%O A258780 2,1
%A A258780 _Michel Lagneau_, Jun 10 2015
%E A258780 Name edited by _Jon E. Schoenfield_, Sep 12 2017
%E A258780 a(20)-a(22) from _Daniel Suteu_, Apr 13 2019
%E A258780 a(23)-a(28) from _Daniel Suteu_, Nov 09 2019