[go: up one dir, main page]

login
Search: a106754 -id:a106754
     Sort: relevance | references | number | modified | created      Format: long | short | data
Primes p where the digital sum is equal to 68.
+10
43
59999999, 69999899, 69999989, 78998999, 88989899, 88999979, 89699999, 89799989, 89989799, 89989979, 89997899, 89997989, 89999699, 89999969, 97889999, 98699999, 98879999, 98899799, 98979989, 98988899, 98989889, 98997989, 98998979, 98999969
OFFSET
1,1
LINKS
Vincenzo Librandi and Chai Wah Wu, Table of n, a(n) for n = 1..10000 n = 1..45 from Vincenzo Librandi.
EXAMPLE
69999899 is a prime with sum of the digits = 68, hence belongs to the sequence.
MATHEMATICA
Select[Prime[Range[10000000]], Total[IntegerDigits[#]]==68 &]
PROG
(Magma) [p: p in PrimesUpTo(100000000) | &+Intseq(p) eq 68];
(Python) # see code in A107579: the same code can be used to produce this sequence, by giving the initial term p = 6*10**7-1, for digit sum 68. - M. F. Hasler, Mar 16 2022
CROSSREFS
Cf. Primes p where the digital sum is equal to k: 2, 11 and 101 for k=2; A062339 (k=4), A062341 (k=5), A062337 (k=7), A062343 (k=8), A107579 (k=10), A106754 (k=11), A106755 (k=13), A106756 (k=14), A106757 (k=16), A106758 (k=17), A106759 (k=19), A106760 (k=20), A106761 (k=22), A106762 (k=23), A106763 (k=25), A106764 (k=26), A048517 (k=28), A106766 (k=29), A106767 (k=31), A106768 (k=32), A106769 (k=34), A106770 (k=35), A106771 (k=37), A106772 (k=38), A106773 (k=40), A106774 (k=41), A106775 (k=43), A106776 (k=44), A106777 (k=46), A106778 (k=47), A106779 (k=49), A106780 (k=50), A106781 (k=52), A106782 (k=53), A106783 (k=55), A106784 (k=56), A106785 (k=58), A106786 (k=59), A106787 (k=61), A107617 (k=62), A107618 (k=64), A107619 (k=65), A106807 (k=67), this sequence (k=68), A181321 (k=70).
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Jul 08 2014
STATUS
approved
Primes whose sum of digits is 4.
+10
26
13, 31, 103, 211, 1021, 1201, 2011, 3001, 10111, 20011, 20101, 21001, 100003, 102001, 1000003, 1011001, 1020001, 1100101, 2100001, 10010101, 10100011, 20001001, 30000001, 101001001, 200001001, 1000000021, 1000001011, 1000010101, 1000020001, 1000200001, 1002000001, 1010000011
OFFSET
1,1
COMMENTS
Is this sequence (and its brothers A062337, A062341 and A062343) infinite?
10^A049054(m)+3 and 3*10^A056807(m)+1 are subsequences. A107715 (primes containing only digits from set {0,1,2,3}) is a supersequence. Terms not containing the digit 3 are either terms of A020449 (primes that contain digits 0 and 1 only) or of A106100 (primes with maximal digit 2) - and thus terms of these sequences' union A036953 (primes containing only digits from set {0,1,2}). - Rick L. Shepherd, May 23 2005
LINKS
T. D. Noe and Robert Israel, Table of n, a(n) for n = 1..10000 (n = 1..1000 from T. D. Noe)
Amin Witno, Numbers which factor as their digital sum times a prime, International Journal of Open Problems in Computer Science and Mathematics 3:2 (2010), pp. 132-136.
FORMULA
Intersection of A052218 (digit sum 4) and A000040 (primes). - M. F. Hasler, Mar 09 2022
EXAMPLE
3001 is a prime with sum of digits = 4, hence belongs to the sequence.
MAPLE
N:= 20: # to get all terms < 10^N
B[1]:= {1}:
B[2]:= {2}:
B[3]:= {3}:
A:= {}:
for d from 2 to N do
B[4]:= map(t -> 10*t+1, B[3]) union map(t -> 10*t+3, B[1]);
B[3]:= map(t -> 10*t, B[3]) union map(t -> 10*t+1, B[2]) union map(t -> 10*t+2, B[1]);
B[2]:= map(t -> 10*t, B[2]) union map(t -> 10*t+1, B[1]);
B[1]:= map(t -> 10*t, B[1]);
A:= A union select(isprime, B[4]);
od:
sort(convert(A, list)); # Robert Israel, Dec 28 2015
MATHEMATICA
Union[FromDigits/@Select[Flatten[Table[Tuples[{0, 1, 2, 3}, k], {k, 9}], 1], PrimeQ[FromDigits[#]]&&Total[#]==4&]] (* Jayanta Basu, May 19 2013 *)
PROG
(PARI) for(a=1, 20, for(b=0, a, for(c=0, b, if(isprime(k=10^a+10^b+10^c+1), print1(k", "))))) \\ Charles R Greathouse IV, Jul 26 2011
(PARI) select( {is_A062339(p, s=4)=sumdigits(p)==s&&isprime(p)}, primes([1, 10^7])) \\ 2nd optional parameter for similar sequences with other digit sums. M. F. Hasler, Mar 09 2022
(PARI) A062339_upto_length(L, s=4, a=List(), u=[10^(L-k)|k<-[1..L]])=forvec(d=[[1, L]|i<-[1..s]], isprime(p=vecsum(vecextract(u, d))) && listput(a, p), 1); Vecrev(a) \\ M. F. Hasler, Mar 09 2022
(Magma) [p: p in PrimesUpTo(800000000) | &+Intseq(p) eq 4]; // Vincenzo Librandi, Jul 08 2014
CROSSREFS
Subsequence of A062338, A107288, and A107715 (primes with digits <= 3).
A159352 is a subsequence.
Cf. A000040 (primes), A052218 (digit sum = 4), A061239 (primes == 4 (mod 9)).
Cf. Primes p with digital sum equal to k: {2, 11 and 101} for k=2; this sequence (k=4), A062341 (k=5), A062337 (k=7), A062343 (k=8), A107579 (k=10), A106754 (k=11), A106755 (k=13), A106756 (k=14), A106757 (k=16), A106758 (k=17), A106759 (k=19), A106760 (k=20), A106761 (k=22), A106762 (k=23), A106763 (k=25), A106764 (k=26), A048517 (k=28), A106766 (k=29), A106767 (k=31), A106768 (k=32), A106769 (k=34), A106770 (k=35), A106771 (k=37), A106772 (k=38), A106773 (k=40), A106774 (k=41), A106775 (k=43), A106776 (k=44), A106777 (k=46), A106778 (k=47), A106779 (k=49), A106780 (k=50), A106781 (k=52), A106782 (k=53), A106783 (k=55), A106784 (k=56), A106785 (k=58), A106786 (k=59), A106787 (k=61), A107617 (k=62), A107618 (k=64), A107619 (k=65), A106807 (k=67), A244918 (k=68), A181321 (k=70).
Cf. A049054 (10^k+3 is prime), A159352 (these primes).
Cf. A056807 (3*10^k+1 is prime), A259866 (these primes).
Cf. A020449 (primes with digits 0 and 1), A036953 (primes with digits <= 2), A106100 (primes with largest digit = 2), A069663, A069664 (smallest resp. largest n-digit prime with minimum digit sum).
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Jun 21 2001
EXTENSIONS
Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jul 06 2001
More terms from Rick L. Shepherd, May 23 2005
More terms from Lekraj Beedassy, Dec 19 2007
STATUS
approved
Primes with digit sum 10.
+10
13
19, 37, 73, 109, 127, 163, 181, 271, 307, 433, 523, 541, 613, 631, 811, 1009, 1063, 1117, 1153, 1171, 1423, 1531, 1621, 1801, 2017, 2053, 2143, 2161, 2251, 2341, 2503, 2521, 3061, 3313, 3331, 3511, 4051, 4231, 5023, 5113, 6121, 6211, 6301, 8011, 8101
OFFSET
1,1
COMMENTS
Subset of A061237 and A117674.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1001..3000 from Vincenzo Librandi and Zak Seidov, terms 1..1000 from Vincenzo Librandi)
FORMULA
Intersection of A000040 (primes) and A052224 (digit sum = 10). - M. F. Hasler, Mar 09 2022
MAPLE
a:=proc(n) local nn: nn:=convert(n, base, 10): if isprime(n)=true and add(nn[j], j=1..nops(nn))=10 then n else end if end proc: seq(a(n), n=1..10^4); # Emeric Deutsch, Mar 06 2008
MATHEMATICA
Select[Prime[Range[100000]], Total[IntegerDigits[#]]==10 &] (* Vincenzo Librandi, Jul 08 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(10000) | &+Intseq(p) eq 10]; // Vincenzo Librandi, Jul 08 2014
(PARI) forprime(p=19, 8101, if(10==sumdigits(p), print(p", "))) \\ Zak Seidov, Oct 08 2016
(PARI) (A107579_nxt(p)=until(isprime(p=A228915(p)), ); p); A107579_first(N=100)=vector(N, i, p=if(i>1, A107579_nxt(p), 19))) \\ M. F. Hasler, Mar 15 2022
(Python)
from itertools import count, islice
from sympy import isprime
from sympy.utilities.iterables import multiset_permutations
def agen(b=10, sod=10): # generator for any base, sum-of-digits
if 0 <= sod < b:
yield sod
nzdigs = [i for i in range(1, b) if i <= sod]
nzmultiset = []
for d in range(1, b):
nzmultiset += [d]*(sod//d)
for d in count(2):
fullmultiset = [0]*(d-1-(sod-1)//(b-1)) + nzmultiset
for firstdig in nzdigs:
target_sum, restmultiset = sod - int(firstdig), fullmultiset[:]
restmultiset.remove(firstdig)
for p in multiset_permutations(restmultiset, d-1):
if sum(p) == target_sum:
t = int("".join(map(str, [firstdig]+p)), b)
if isprime(t):
yield t
if p[0] == target_sum:
break
print(list(islice(agen(), 45))) # Michael S. Branicky, Mar 10 2022
(Python)
from sympy import isprime
def A107579(p=19):
"Return a generator of the sequence of all primes >= p with the same digit sum as p."
while True:
if isprime(p): yield p
p = A228915(p) # skip to next larger integer with the same digit sum
a=A107579(); [next(a) for _ in range(50)] # M. F. Hasler, Mar 16 2022
CROSSREFS
Cf. A000040 (primes), A007953 (sum of digits), A052224 (digit sum = 10).
Cf. A061237 (sum of digits == 1 (mod 9)).
Subsequence of A062340 (primes with digit sum divisible by 5).
Cf. A062339 (same for digit sum s = 4), A062341 (s = 5), A062343 (s = 8), A106754 (s = 11), and others listed in A244918 (s = 68).
KEYWORD
nonn,base
AUTHOR
Zak Seidov, May 16 2005
EXTENSIONS
Edited by N. J. A. Sloane, Feb 20 2009 at the suggestion of Pacha Nambi
STATUS
approved
Primes with digit sum = 64.
+10
8
19999999, 29999899, 29999989, 39979999, 39999979, 47999899, 48899899, 48989989, 48997999, 48999799, 48999889, 49989799, 49999699, 49999897, 56999989, 58799899, 58898989, 58988899, 58997899, 59698999, 59788999
OFFSET
1,1
LINKS
MATHEMATICA
Select[Prime[Range[3600000]], Total[IntegerDigits[#]]==64&] (* Harvey P. Dale, Jan 19 2012 *)
PROG
(Magma) [p: p in PrimesUpTo(69000000) | &+Intseq(p) eq 64]; // Vincenzo Librandi, Jul 09 2014
CROSSREFS
Cf. similar sequences listed in A244918.
KEYWORD
nonn,base
AUTHOR
Zak Seidov, May 18 2005
STATUS
approved
Primes with digit sum = 62.
+10
7
9899999, 18899999, 18999989, 19899989, 19998899, 19998989, 27989999, 27999899, 28998989, 28999979, 29789999, 29798999, 29969999, 29979899, 29988899, 29988989, 29989889, 29997899, 29998799, 29998889, 29999699, 36998999
OFFSET
1,1
LINKS
MATHEMATICA
Select[Prime[Range[600000]], Total[IntegerDigits[#]]==62 &] (* Vincenzo Librandi, Jul 09 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(38000000) | &+Intseq(p) eq 62]; // Vincenzo Librandi, Jul 09 2014
CROSSREFS
Cf. similar sequences listed in A244918.
KEYWORD
nonn,base
AUTHOR
Zak Seidov, May 18 2005
STATUS
approved
Primes with digit sum = 65.
+10
6
29999999, 39899999, 39999899, 48999989, 49898999, 49899989, 49979999, 49997999, 57899999, 57998999, 57999899, 58899989, 58989899, 58998899, 59879999, 59898899, 59898989, 59979989, 59987999, 59988989, 59999879
OFFSET
1,1
LINKS
MATHEMATICA
Select[Prime[Range[600000]], Total[IntegerDigits[#]]==65 &] (* Vincenzo Librandi, Jul 09 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(69000000) | &+Intseq(p) eq 65]; // Vincenzo Librandi, Jul 09 2014
CROSSREFS
Cf. Similar sequences listed in A244918.
KEYWORD
nonn,base
AUTHOR
Zak Seidov, May 18 2005
STATUS
approved
Primes p with digital sum equal to 13.
+10
5
67, 139, 157, 193, 229, 283, 337, 373, 409, 463, 571, 607, 643, 661, 733, 751, 823, 1039, 1093, 1129, 1237, 1291, 1327, 1381, 1453, 1471, 1543, 1723, 1741, 1831, 2029, 2083, 2137, 2281, 2371, 2551, 2713, 2731, 2803, 3019, 3037, 3109, 3163, 3181, 3217, 3253
OFFSET
1,1
LINKS
FORMULA
Intersection of A000040 (primes) and A143164 (digit sum = 13); also equals { p in A000040 | A007953(p) = 13 }. - M. F. Hasler, Mar 09 2022
MATHEMATICA
Select[Prime[Range[100000]], Total[IntegerDigits[#]]==13 &] (* Vincenzo Librandi, Jul 08 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(10000) | &+Intseq(p) eq 13]; // Vincenzo Librandi, Jul 08 2014
(PARI) select( {is_A106755(n)=sumdigits(n)==13&&isprime(n)}, primes([1, 3333])) \\ M. F. Hasler, Mar 09 2022
CROSSREFS
Cf. A000040 (primes), A007953 (sum of digits), A143164 (digit sum = 13).
Cf. A062339 (same for digit sum s = 4), ..., A106754 (s = 11), A106756 (s = 14), and others listed in A244918 (s = 68).
KEYWORD
nonn,base
AUTHOR
Zak Seidov, May 16 2005
STATUS
approved
Primes with digit sum = 67.
+10
5
59899999, 69899899, 69899989, 69979999, 69997999, 69999799, 77899999, 78997999, 78998989, 78999889, 78999979, 79699999, 79879999, 79889899, 79979899, 79979989, 79988899, 79989979, 79996999, 79997899, 79997989
OFFSET
1,1
COMMENTS
499999909 is the smallest term that contains 0 as a digit. - Altug Alkan, Mar 25 2018
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (first 128 terms from Vincenzo Librandi)
MAPLE
F:= proc(t, d)
if d = 1 then
if t<=9 then return [t] else return [] fi
fi;
if t > 9*d then return [] fi;
[seq(op(map(x -> a*10^(d-1)+x, procname(t-a, d-1))), a=0..min(9, t))]
end proc:
select(isprime, F(67, 8)); # Robert Israel, Mar 25 2018
MATHEMATICA
Select[Prime[Range[600000]], Total[IntegerDigits[#]]==67 &] (* Vincenzo Librandi, Jul 09 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(90000000) | &+Intseq(p) eq 67]; // Vincenzo Librandi, Jul 09 2014
(PARI) isok(n) = isprime(n) && (sumdigits(n) == 67); \\ Altug Alkan, Mar 25 2018
CROSSREFS
Cf. similar sequences listed in A244018.
KEYWORD
nonn,base
AUTHOR
Zak Seidov, May 18 2005
STATUS
approved
Prime trio leaders: largest number of a prime trio.
+10
5
29, 47, 83, 137, 173, 191, 227, 263, 281, 317, 353, 443, 461, 599, 641, 797, 821, 887, 911, 977, 1019, 1091, 1109, 1163, 1181, 1217, 1307, 1361, 1433, 1451, 1499, 1523, 1613, 1697, 1721, 1787, 1811, 1877, 1901, 1949, 2027, 2063, 2081, 2153, 2207, 2243
OFFSET
1,1
COMMENTS
A prime trio is a set of three distinct prime numbers such that the third number is a 1-digit number which is the sum of the digits of the second number and the second number is the sum of the digits of the first number.
LINKS
EXAMPLE
443 is in the sequence because it is the largest number of the prime trio (443, 11, 2).
599 is the first term with sum of digits different from 11 (cf. A106754), namely 23 (cf. A106762). This sequence contains also all primes with sum of digits equal to 41, 43, 61 etc., but not 29, 47, ... since the second digit sum must be a single-digit prime, i.e., 2, 3, 5 or 7. - M. F. Hasler, Mar 09 2022
MAPLE
filter:= proc(n) local x, y;
if not isprime(n) then return false fi;
x:= convert(convert(n, base, 10), `+`);
if x < 10 or not isprime(x) then return false fi;
y:= convert(convert(x, base, 10), `+`);
member(y, {2, 3, 5, 7})
end proc:
select(filter, [seq(i, i=11..10000, 2)]); # Robert Israel, May 21 2021
MATHEMATICA
ptQ[n_]:=Module[{c=NestList[Total[IntegerDigits[#]]&, n, 2]}, Length[ Union[c]] == 3&&And@@PrimeQ[c]]; Select[Prime[Range[500]], ptQ] (* Harvey P. Dale, Aug 15 2012 *)
PROG
(PARI) select( {is_A119891(n, s=sumdigits(n))=bittest(172, sumdigits(s)) && isprime(s) && s>9 && isprime(n)}, primes([1, 2345])) \\ M. F. Hasler, Mar 09 2022
CROSSREFS
Subsequence of A304367.
Cf. A000040 (primes), A007953 (sum of digits), A106754 (primes with s.o.d. = 11), A106762 (s.o.d.(p) = 23), A106774 (s.o.d.(p) = 41), A106775 (s.o.d.(p) = 43), A106787 (s.o.d.(p) = 61): subsequences.
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), May 27 2006
STATUS
approved
Sum of digits of primes (A007605), sorted and with duplicates removed.
+10
5
2, 3, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 103
OFFSET
1,1
COMMENTS
Presumably this is 3 together with numbers greater than 1 and not divisible by 3 (see A001651). - Charles R Greathouse IV, Jul 17 2013. (This is not a theorem because we do not know if, given s > 3 and not a multiple of 3, there is always a prime with digit-sum s. Cf. A067180, A067523. - N. J. A. Sloane, Nov 02 2018)
From Chai Wah Wu, Nov 04 2018: (Start)
Conjecture: for s > 10 and not a multiple of 3, there exists a prime with digit-sum s consisting only of the digits 2 and 3 (cf. A137269). This conjecture has been verified for s <= 2995.
Conjecture: for s > 18 and not a multiple of 3, there exists a prime with digit-sum s consisting only of the digits 3 and 4. This conjecture has been verified for s <= 1345.
Conjecture: for s > 90 and not a multiple of 3, there exists a prime with digit-sum s consisting only of the digits 8 and 9. This conjecture has been verified for s <= 8995.
Conjecture: for 0 < a < b < 10, gcd(a, b) = 1 and ab not a multiple of 10, if s > 90 and s is not a multiple of 3, then there exists a prime with digit-sum s consisting only of the digits a and b. (End)
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Dec 19 2007
EXTENSIONS
Corrected by Jeremy Gardiner, Feb 09 2014
STATUS
approved

Search completed in 0.011 seconds