OFFSET
1,3
COMMENTS
LINKS
MATHEMATICA
q[n_] := Module[{k = n, p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; Count[s, _?(# > 2 &)] == 0]; Select[Range[0, 250], q] (* Amiram Eldar, Mar 06 2024 *)
PROG
(PARI)
ismaxprimobasedigit_at_most(n, k) = { my(s=0, p=2); while(n, if((n%p)>k, return(0)); n = n\p; p = nextprime(1+p)); (1); };
isA370132(n) = ismaxprimobasedigit_at_most(n, 2);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 10 2024
STATUS
approved