login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A237600 Right-truncatable primes in base 16. 12
2, 3, 5, 7, 11, 13, 37, 41, 43, 47, 53, 59, 61, 83, 89, 113, 127, 179, 181, 191, 211, 223, 593, 599, 601, 607, 659, 661, 691, 701, 757, 761, 853, 857, 859, 863, 947, 953, 977, 983, 991, 1427, 1429, 1433, 1439, 1811, 1823, 2039, 2879, 2897, 2903, 2909, 3061 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Numbers with these properties: (i) a(n) is a prime and (ii) its image under the function E(k) = k\16 = floor(k/16) is zero or has the same properties. [Corrected by M. F. Hasler, Nov 07 2018]

The sequence has 414 nonzero members.

Otherwise said, integers p > 0 such that floor(p/16^k) is prime or zero for all k >= 0. One might relax to p >= 0, i.e., include an initial term 0, corresponding to an empty string of digits. The recursive definition can also be used to produce all of the terms, starting with the primes < 16, and adding, for each term of the list, the primes made from appending a digit to that term, i.e., the primes between 16 x that term and 16 more. The sequence can also be seen as a table whose n-th row yields the terms with n digits in base 16: row lengths are A237601 and the last term of row n is A237602(n). - M. F. Hasler, Nov 07 2018

LINKS

Stanislav Sykora, Table of n, a(n) for n = 1..414

Stanislav Sykora, PARI/GP scripts for genetic threads

EXAMPLE

a(414) = 16778492037124607, in hexadecimal notation 3B9BF319BD51FF, belongs to a(n) because each of its hexadecimal prefixes (including itself) is a prime. Being the largest of such numbers, it is also a member of A023107.

MATHEMATICA

Select[Range@ 3600, AllTrue[Most[DeleteDuplicates@ FixedPointList[f, #]], PrimeQ] &] (* Michael De Vlieger, Mar 07 2015, Version 10 *)

PROG

(PARI) GT_Trunc1(nmax, prop, b=10) = { \\ See the link for details

  my (n=0, v=vector(nmax), g=1, lgs=1, lge, an, c);

  for (k=1, b-1, if (prop(k), v[n++]=k));

  lge=n; c=lge-lgs+1;

  while (c, g++; for (k=lgs, lge, for (m=0, b-1, an=b*v[k]+m;

    if (prop(an), v[n++]=an; if (n>=nmax, return (v))); ); );

    lgs=lge+1; lge=n; c=lge-lgs+1; );

  if (n, return (v[1..n]));

  print("No solution"); }

v = GT_Trunc1(1000000, isprime, 16)

(PARI) isok(n)={ while(n, if(!isprime(n), return(0)); n\=16); 1} \\ Joerg Arndt, Mar 07 2015

(PARI) my(A=primes([0, 15]), i=1); until(#A<i+=1, A=concat(A, primes([A[i], A[i]+1]*16))); #A237600=A \\ M. F. Hasler, Nov 07 2018

(Python)

from gmpy2 import is_prime

A237600_list = []

for n in range(1, 10**9):

....if is_prime(n):

........s = format(n, 'x')

........for i in range(1, len(s)):

............if not is_prime(int(s[:-i], 16)):

................break

........else:

............A237600_list.append(n) # Chai Wah Wu, Apr 16 2015

CROSSREFS

Cf. A023107, A024770 (base 10), A237601, A237602, A254756.

Sequence in context: A187614 A191077 A262377 * A228199 A128292 A140464

Adjacent sequences:  A237597 A237598 A237599 * A237601 A237602 A237603

KEYWORD

nonn,base,fini,full,easy,tabf,changed

AUTHOR

Stanislav Sykora, Feb 15 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 16 13:54 EST 2018. Contains 317274 sequences. (Running on oeis4.)