A258413
Numbers m such that antisigma(m) contains sigma(m) as a substring.
Original entry on oeis.org
34, 79, 479, 1529, 2879, 4895, 8873, 14243, 26879, 62498, 79999, 295285, 559571, 589219, 644735, 799999, 2012897, 2181600, 2233033, 2395488, 6399839, 7453541, 7922023, 8598719, 22928034, 26861727, 37894930, 55056372, 63652895, 76820471, 144726608, 174044214
Offset: 1
sigma(34) = 54 and antisigma(34) = 34*35/2 - 54 = 541, which contains 54 as a substring;
sigma(79) = 80 and antisigma(79) = 79*80/2 - 80 = 3080, which contains 80 as a substring;
sigma(479) = 480 and antisigma(479) = 479*480/2 - 480 = 114480, which contains 480 as a substring.
-
with(numtheory): P:=proc(q) local a,b,c,d,j,k,n;
for n from 1 to q do a:=sigma(n); c:=ilog10(a)+1; b:=n*(n+1)/2-sigma(n); d:=ilog10(b)+1; for k from 0 to d-c do j:=trunc(b/10^k);
if a=j-trunc(j/10^c)*10^c then print(n); break; fi; od; od; end: P(10^9);
-
fQ[n_]:=StringMatchQ[ToString[n*(n+1)/2-DivisorSigma[1,n]],_~~ToString[DivisorSigma[1,n]]~~_];Select[Range[10^5],fQ[#]&] (* Ivan N. Ianakiev, Jun 18 2015 *)
fQ[n_]:=StringContainsQ[ToString[n*(n+1)/2-DivisorSigma[1,n]],ToString[DivisorSigma[1,n]]];Select[Range[10^5],fQ[#]&] (* much faster *) (* Ivan N. Ianakiev, Apr 02 2022 *)
A093947
Primes of the form 8*10^k - 1.
Original entry on oeis.org
7, 79, 79999, 799999, 799999999, 79999999999, 79999999999999999999999999, 79999999999999999999999999999999999999999999999999, 79999999999999999999999999999999999999999999999999999999999999999999999999999
Offset: 1
-
[a: n in [0..200] | IsPrime(a) where a is (8*10^n-1)]; // Vincenzo Librandi, May 08 2019
-
Select[Table[FromDigits[PadRight[{7}, n, 9]], {n, 50}], PrimeQ] (* Vincenzo Librandi, May 08 2019 *)
A129990
Primes p such that the smallest integer whose sum of decimal digits is p is prime.
Original entry on oeis.org
2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 71, 79, 97, 173, 179, 257, 269, 311, 389, 691, 4957, 8423, 11801, 14621, 25621, 26951, 38993, 75743, 102031, 191671, 668869
Offset: 1
The smallest integer whose sum of digits is 17 is 89; 89 is prime, therefore 17 is in the sequence.
-
Select[Prime[Range[1000]],PrimeQ[FromDigits[Join[{Mod[ #,9]},Table[9,{i,1,Floor[ #/9]}]]]] &]
-
from itertools import islice
from sympy import isprime, nextprime
def A051885(n): return ((n%9)+1)*10**(n//9)-1 # from Chai Wah Wu
def agen(startp=2):
p = startp
while True:
if isprime(A051885(p)): yield p
p = nextprime(p)
print(list(islice(agen(), 23))) # Michael S. Branicky, Jul 27 2022
-
sorted( filter(is_prime, sum(([9*t+k for t in oeis(seq).first_terms()] for seq,k in (('A002957',1), ('A056703',2), ('A056712',4), ('A056716',5), ('A056721',7), ('A056725',8))), [3])) ) # Max Alekseyev, Feb 05 2025
A248819
Numbers n such that the digits of antisigma(n) end in sigma(n).
Original entry on oeis.org
79, 479, 2879, 4895, 26879, 79999, 644735, 799999, 2395488, 6399839, 8598719, 63652895, 144726608, 799999999, 935546879, 12640160863, 15282380799, 43687707904, 79999999999
Offset: 1
sigma(4895) = 6480 and antisigma of 4895 is (4895 * 4896) / 2 - sigma(4895) = 11982960 - 6480 = 11976480.
Showing 1-4 of 4 results.
Comments