[go: up one dir, main page]

login
Search: a077722 -id:a077722
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of digits of A077722(n) written in base 8.
+20
0
3, 4, 4, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
OFFSET
1,1
EXAMPLE
a(5)=6 since A077722(5)=32833, which has an octal form of 100101 (6 digits).
MAPLE
s := 0:for n from 1 to 7000 do b := convert(n, base, 2): q := sum(b[i]*8^(i-1), i=1..nops(b)): if(isprime(q)) then s := s+1:a[s] := nops(b):fi: od:seq(a[k], k=1..s);
CROSSREFS
Cf. A077722.
KEYWORD
nonn,base
AUTHOR
Francois Jooste (phukraut(AT)hotmail.com), Dec 23 2002
EXTENSIONS
More terms from Sascha Kurz, Feb 10 2003
STATUS
approved
Number of 1's in the base 8 form of A077722(n).
+20
0
3, 3, 3, 4, 3, 4, 5, 4, 5, 3, 4, 3, 5, 5, 5, 4, 3, 4, 5, 5, 5, 4, 5, 5, 4, 3, 4, 5, 5, 6, 6, 4, 5, 6, 8, 4, 5, 6, 6, 5, 3, 4, 4, 5, 6, 5, 3, 4, 6, 5, 6, 8, 6, 5, 4, 6, 8, 5, 5, 5, 6, 6, 8, 3, 4, 5, 4, 6, 6, 5, 6, 8, 4, 5, 5, 6, 5, 8, 4, 6, 8, 6, 8, 6, 8, 8, 8, 5, 6, 6, 5, 5, 5, 8, 4, 6, 6, 8, 8, 9, 6, 8, 5, 5, 4
OFFSET
1,1
EXAMPLE
a(5)=3 since A077722(5)=32833, which has an octal form of 100101, which has 3 ones.
MAPLE
s := 0:for n from 1 to 7000 do b := convert(n, base, 2):q := sum(b[i]*8^(i-1), i=1..nops(b)): if(isprime(q)) then s := s+1:a[s] := sum(b[i], i=1..nops(b)):fi:od:seq(a[k], k=1..s);
CROSSREFS
Cf. A077722.
KEYWORD
nonn
AUTHOR
Francois Jooste (phukraut(AT)hotmail.com), Dec 23 2002
EXTENSIONS
More terms from Sascha Kurz, Feb 10 2003
STATUS
approved
Number of zeros in the base 8 form of A077722(n).
+20
0
0, 1, 1, 1, 3, 2, 1, 2, 1, 4, 3, 4, 2, 2, 2, 4, 5, 4, 3, 3, 3, 4, 3, 3, 5, 6, 5, 4, 4, 3, 3, 5, 4, 3, 1, 5, 4, 3, 3, 5, 7, 6, 6, 5, 4, 5, 7, 6, 4, 5, 4, 2, 4, 5, 6, 4, 2, 5, 5, 5, 4, 4, 2, 8, 7, 6, 7, 5, 5, 6, 5, 3, 7, 6, 6, 5, 6, 3, 7, 5, 3, 5, 3, 5, 3, 3, 3, 6, 5, 5, 6, 6, 6, 3, 7, 5, 5, 3, 3, 2, 5, 3, 7, 7, 8
OFFSET
1,5
EXAMPLE
a(5)=3 since A077722(5)=32833 which has octal form 100101, which has 3 zeros.
CROSSREFS
Cf. A077722.
KEYWORD
nonn
AUTHOR
Francois Jooste (phukraut(AT)hotmail.com), Dec 23 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 02 2003
STATUS
approved
Primes which can be expressed as sum of distinct powers of 4.
+10
13
5, 17, 257, 277, 337, 1093, 1109, 1297, 1301, 1361, 4177, 4357, 4373, 4421, 5189, 5381, 5393, 5441, 16453, 16657, 16661, 17477, 17489, 17669, 17681, 17729, 17749, 20549, 20753, 21521, 21569, 21589, 21841, 65537, 65557, 65617, 65809, 66629
OFFSET
1,1
COMMENTS
Primes whose base 4 representation contains only zeros and 1's.
As a subsequence of primes in A000695, these could be called Moser-de Bruijn primes. See also A235461 for those terms whose base 4 representation also represents a prime in base 2. - M. F. Hasler, Jan 11 2014
LINKS
MAPLE
f:= proc(n) local L, x;
L:= convert(n, base, 2);
x:= 1+add(L[i]*4^i, i=1..nops(L));
if isprime(x) then x fi
end proc:
map(f, [$1..1000]); # Robert Israel, Sep 06 2018
MATHEMATICA
Select[Prime[Range[6650]], Max[IntegerDigits[#, 4]]<=1&] (* Jayanta Basu, May 22 2013 *)
PROG
(PARI) for(i=1, 999, isprime(b=vector(#b=binary(i), j, 4^(#b-j))*b~)&&print1(b", ")) \\ - M. F. Hasler, Jan 12 2014
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 03 2003
STATUS
approved
Primes which can be expressed as a sum of distinct powers of 3.
+10
11
3, 13, 31, 37, 109, 271, 283, 337, 733, 739, 757, 769, 811, 823, 1009, 1063, 1093, 2269, 2281, 2467, 2521, 2539, 2551, 2917, 2953, 3001, 3037, 3163, 3169, 3187, 3253, 3271, 6571, 6673, 6679, 6841, 7321, 7411, 7537, 7561, 7573, 8761, 8779, 8839, 9001
OFFSET
1,1
COMMENTS
Primes whose base 3 representation contains only 0's and 1's.
LINKS
EXAMPLE
31 = 3^3 + 3 + 1 belongs to this sequence.
MATHEMATICA
Select[FromDigits[#, 3]&/@Tuples[{0, 1}, 10], PrimeQ] (* Harvey P. Dale, Mar 30 2015 *)
PROG
(PARI) print1(3); forstep(n=3, 1e3, 2, if(isprime(t=fromdigits(binary(n), 3)), print1(", "t))) \\ Charles R Greathouse IV, Mar 28 2022
(PARI) is_A077717(n)=vecmax(digits(n, 3))<2 && isprime(n)
select(is_A077717, [1..9111]) \\ M. F. Hasler, Feb 15 2023
(Python)
def is_A077717(n): return A039966(n) and A010051(n) # M. F. Hasler, Feb 15 2023
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from John W. Layman, Nov 22 2002
STATUS
approved
Primes which can be expressed as sum of distinct powers of 6.
+10
10
7, 37, 43, 223, 1297, 1303, 1549, 7993, 9109, 46663, 54469, 55987, 281233, 326593, 327889, 335917, 1679653, 1679659, 1679833, 1680919, 1681129, 1687393, 1726273, 1726489, 1727569, 1727827, 1734049, 1960891, 1961107, 1967587, 2006461
OFFSET
1,1
COMMENTS
Primes whose base 6 representation contains only zeros and 1's.
LINKS
MATHEMATICA
Select[FromDigits[#, 6]&/@Tuples[{0, 1}, 9], PrimeQ] (* Harvey P. Dale, May 01 2018 *)
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 03 2003
STATUS
approved
Primes which can be expressed as sum of distinct powers of 7.
+10
10
7, 2801, 17207, 19559, 120401, 134513, 134807, 137201, 840743, 842759, 842801, 941249, 943601, 958007, 958049, 958343, 960793, 5782001, 5784409, 5899307, 5899601, 5899657, 5901659, 6591089, 6607903, 6706393, 6708787, 6722801, 6722857, 6723193
OFFSET
1,1
COMMENTS
Primes whose base 7 representation contains only zeros and 1's.
LINKS
MAPLE
pos := 0:for i from 1 to 4000 do b := convert(i, base, 2); s := sum(b[j]*7^(j-1), j=1..nops(b)): if(isprime(s)) then pos := pos+1:a[pos] := s:fi: od:seq(a[j], j=1..pos);
MATHEMATICA
Select[Prime[Range[10^6]], Max[IntegerDigits[#, 7]]<=1 &] (* Vincenzo Librandi, Sep 07 2018 *)
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 03 2003
STATUS
approved
Primes which can be expressed as sum of distinct powers of 5.
+10
9
5, 31, 131, 151, 631, 751, 3251, 3881, 16381, 19381, 19501, 19531, 78781, 78901, 81281, 81401, 81901, 82031, 93901, 94531, 97001, 97501, 97651, 390751, 390781, 393901, 394501, 406381, 468781, 469501, 471901, 472631, 484531, 485131, 487651, 1953151, 1953901
OFFSET
1,1
COMMENTS
Primes whose base 5 representation contains only zeros and 1's.
LINKS
PROG
(Python)
from sympy import isprime
def aupton(terms):
k, alst = 0, []
while len(alst) < terms:
k += 1
t = sum(5**i*int(di) for i, di in enumerate((bin(k)[2:])[::-1]))
if isprime(t): alst.append(t)
return alst
print(aupton(37)) # Michael S. Branicky, May 31 2021
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 03 2003
a(36) and beyond from Michael S. Branicky, May 31 2021
STATUS
approved
Primes which can be expressed as sum of distinct powers of 9.
+10
6
739, 811, 6571, 59779, 65701, 532261, 538093, 591301, 597133, 597781, 4783699, 4789621, 4842109, 4849399, 5314411, 5314501, 5373469, 5374279, 5380831, 43047541, 43112341, 43113061, 43643773, 43643863, 47837071, 47888821
OFFSET
1,1
COMMENTS
Primes whose base 9 representation contains only zeros and 1's.
MATHEMATICA
Select[Prime[Range[3000000]], Union[Most[Rest[DigitCount[#, 9]]]]=={0}&] (* Harvey P. Dale, Jul 31 2013 *)
PROG
(PARI) lista(nn) = {forprime(p=2, nn, if (vecmax(digits(p, 9)) <= 1, print1(p, ", ")); ); } \\ Michel Marcus, Oct 10 2014
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 03 2003
STATUS
approved
a(n) = smallest prime which can be expressed as a sum of distinct powers of n.
+10
3
2, 3, 5, 5, 7, 7, 73, 739, 11, 11, 13, 13, 197, 241, 17, 17, 19, 19, 401, 463, 23, 23, 577, 10171901, 677, 757, 29, 29, 31, 31, 32801, 1123, 1336337, 44101, 37, 37, 1483, 59359, 41, 41, 43, 43, 85229, 93151, 47, 47, 110641, 13847169701, 2551, 345157903, 53, 53
OFFSET
2,1
COMMENTS
a(n) = smallest prime whose base n representation contains only zeros and 1's.
Values of n at which a(n) reach record values are: 2, 3, 4, 6, 8, 9, 25, 49, 91, 121, 187, 201, 301, 721, 799, 841... Notably, many of them are squares of primes. - Ivan Neretin, Sep 20 2017
LINKS
MATHEMATICA
Table[i = p = 1; While[! PrimeQ[p], p = FromDigits[IntegerDigits[i++, 2], n]]; p, {n, 2, 53}] (* Ivan Neretin, Sep 20 2017 *)
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 03 2003
STATUS
approved

Search completed in 0.013 seconds