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.

A322300 a(n) is the least k such that A001222(k)=n and A001222(k+1)=n+1.

This page as a plain text file.
%I A322300 #29 Jul 09 2023 08:28:25
%S A322300 1,3,26,99,495,728,1215,6560,309824,1896128,1043199,15752960,
%T A322300 178149375,399112191,4226550272,7219625984,45990608895,558743781375,
%U A322300 1565795778560,28996228218879,63685431525375,45922887663615,1956754664980479,30987856352641023
%N A322300 a(n) is the least k such that A001222(k)=n and A001222(k+1)=n+1.
%C A322300 Dickson's conjecture implies that a(n) exists for each n.
%e A322300 a(3)= 99 because 99=3^2*11 has three prime factors (counted with multiplicity) and 99+1=2^2*5^2 has four, and 99 is the least number with those properties.
%p A322300 b:= 0:
%p A322300 for n from 2 do
%p A322300   a:= b;
%p A322300   b:= numtheory:-bigomega(n);
%p A322300   if b = a+1 and not assigned(A[a]) then
%p A322300      A[a]:= n-1;
%p A322300      if a = 9 then break fi
%p A322300   fi
%p A322300 od:
%p A322300 seq(A[i],i=0..9);
%t A322300 a[n_] := Module[{k = 1}, While[PrimeOmega[k] != n || PrimeOmega[k + 1] != n + 1, k++]; k]; Array[a, 10, 0] (* _Amiram Eldar_, Dec 03 2018 *)
%o A322300 (PARI)
%o A322300 isok(n,k) = bigomega(k) == n && bigomega(k+1) == n+1;
%o A322300 a(n) = for(k=1, oo, if(isok(n,k), return(k))); \\ _Daniel Suteu_, May 05 2022
%o A322300 (PARI)
%o A322300 generate(A, B, n, k) = A=max(A, 2^n); (f(m, p, n) = my(list=List()); if(n==1, forprime(q=max(p, ceil(A/m)), B\m, if(bigomega(m*q-1) == k, listput(list, m*q-1))), forprime(q=p, sqrtnint(B\m, n), list=concat(list, f(m*q, q, n-1)))); list); vecsort(Vec(f(1, 2, n)));
%o A322300 a(n) = my(x=2^n, y=2*x); while(1, my(v=generate(x, y, n+1, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ _Daniel Suteu_, Jul 09 2023
%Y A322300 Cf. A001222, A076156, A079482.
%K A322300 nonn,more
%O A322300 0,2
%A A322300 _Robert Israel_ and _J. M. Bergot_, Dec 02 2018
%E A322300 a(9)-a(13) from _Rémy Sigrist_, Dec 03 2018
%E A322300 a(14)-a(18) from _Giovanni Resta_, Jun 11 2020
%E A322300 a(19)-a(21) from _Daniel Suteu_, May 05 2022
%E A322300 a(22)-a(23) from _Daniel Suteu_, Jul 09 2023