A246628 a(1)=1, a(n+1) is the smallest number m such that A244448(a(n)) < A244448(m).
1, 2, 10, 635, 1810, 4502, 7598, 11117, 32146, 32770, 58079
Offset: 1
Extensions
a(8)-a(11) from Jinyuan Wang, Mar 18 2020
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.
A244448(A246628(1)) = A244448(1) = 153. A244448(A246628(2)) = A244448(2) = 442. A244448(A246628(7)) = A244448(7598) = 1134378.
n=10: k=13 because 13-10 and 13+10 are both prime and 13 is the smallest k such that k +/- 10 are both prime 4-1=3, prime, 4+1=5, prime; 5-2=3, 5+2=7; 8-3=5, 8+3=11; 9-4=5, 9+4=13, ...
distance:=function(n); k:=n+2; while not IsPrime(k-n) or not IsPrime(k+n) do k:=k+1; end while; return k; end function; [ distance(n): n in [1..71] ]; /* Klaus Brockhaus, Apr 08 2007 */
Primes:= select(isprime,{seq(2*i+1,i=1..10^3)}): a[0]:= 2: for n from 1 do Q:= Primes intersect map(t -> t-2*n,Primes); if nops(Q) = 0 then break fi; a[n]:= min(Q) + n; od: seq(a[i],i=0..n-1); # Robert Israel, Sep 08 2014
s = ""; k = 0; For[i = 3, i < 22^2, If[PrimeQ[i - k] && PrimeQ[i + k], s = s <> ToString[i] <> ","; k++ ]; i++ ]; Print[s] (* Vladimir Joseph Stephan Orlovsky, Apr 03 2008 *) snk[n_]:=Module[{k=n+1},While[!PrimeQ[k+n]||!PrimeQ[k-n],k++];k]; Array[ snk,80,0] (* Harvey P. Dale, Dec 13 2020 *)
a(n)=my(k);while(!isprime(k-n) || !isprime(k+n),k++);return(k) \\ Edward Jiang, Sep 05 2014
a(1)=25 because 25-1 is composite, phi(25-1)+sigma(25+1)=2*25 and there is no such number less than 25.
a[n_]:=(For[m=n+1, PrimeQ[m-n]||EulerPhi[m-n]+DivisorSigma[1,m+n]!=2m,m++];m);Table[a[n],{n,60}]
a(n)=m=n+4;while(isprime(m-n)||eulerphi(m-n)+sigma(m+n)!=2*m,m++);m vector(100,n,a(n)) \\ Derek Orr, Aug 30 2014
a(1)=11 because 11-1 is composite, phi(11+1)+sigma(11-1)=2*11 and there is no such number less than 11.
a[n_]:=(For[m=n+1,PrimeQ[m-n]||EulerPhi[m+n]+DivisorSigma[1,m-n]!=2m,m++];m);Table[a[n],{n,70}]
a(n)=m=n+4;while(isprime(m-n)||eulerphi(m+n)+sigma(m-n)!=2*m,m++);m vector(100,n,a(n)) \\ Derek Orr, Aug 30 2014
Comments