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.
%I A090709 #44 Jan 13 2025 23:27:21 %S A090709 2,3,5,11,31,101,151,211,241,251,331,421,431,521,1021,1151,1231,1321, %T A090709 2011,2131,2311,2351,2441,2531,2551,3041,3221,3251,3301,3541,4021, %U A090709 4111,4201,4421,4441,4451,5011,5021,5101,5231,5441,5531,10331,11131,11311 %N A090709 Primes whose decimal representation is a valid number in base 6 and interpreted as such is again a prime. %H A090709 Chai Wah Wu, <a href="/A090709/b090709.txt">Table of n, a(n) for n = 1..10000</a> %e A090709 31 is prime in decimal and a valid number in base 6: 31_6 = 19, a prime. %t A090709 Select[ FromDigits@# & /@ IntegerDigits[ Prime@ Range@ 270, 6], PrimeQ] (* _Robert G. Wilson v_, Jan 05 2014 *) %t A090709 vn6pQ[n_]:=Module[{idn=IntegerDigits[n]},Max[idn]<6&&PrimeQ[ FromDigits[ idn,6]]]; Select[Prime[Range[1500]],vn6pQ] (* _Harvey P. Dale_, Jul 10 2015 *) %o A090709 (Python) %o A090709 from gmpy2 import digits, is_prime %o A090709 A090709_list = [n for n in (int(digits(d,6)) for d in range(10**6) if is_prime(d)) if is_prime(n)] # _Chai Wah Wu_, Apr 09 2016 %o A090709 (PARI) fixBase(n, oldBase, newBase)=my(d=digits(n, oldBase), t=newBase-1); for(i=1, #d, if(d[i]>t, for(j=i, #d, d[j]=t); break)); fromdigits(d, newBase) %o A090709 list(lim)=my(v=List(), t); forprime(p=2, fixBase(lim\1, 10, 6), if(isprime(t=fromdigits(digits(p, 6), 10)), listput(v, t))); Vec(v) \\ _Charles R Greathouse IV_, Nov 07 2016 %o A090709 (Magma) [n:n in PrimesUpTo(12000)| Max(Intseq(n,10)) le 5 and IsPrime(Seqint(Intseq(Seqint(Intseq(n),6))))]; // _Marius A. Burtea_, Jun 30 2019 %Y A090709 Cf. A031974, A089971, A089981, A090707, A090708, A090710, A235394, A235395, A000040. %K A090709 base,nonn %O A090709 1,1 %A A090709 _Cino Hilliard_, Jan 18 2004 %E A090709 Following suggestions by _V.J. Pohjola_ and _Donovan Johnson_, name, example and offset corrected by _M. F. Hasler_, Jan 03 2014