A178796
An ascending sequence of primes a(n) such that either the sum of decimal digits of a(n) is divisible by the sum of decimal digits of a(n+1) or vice versa.
Original entry on oeis.org
2, 11, 13, 17, 31, 53, 71, 79, 97, 101, 103, 107, 211, 233, 251, 277, 349, 367, 431, 439, 457, 503, 521, 547, 619, 673, 691, 701, 709, 727, 853, 907, 1021, 1061, 1069, 1087, 1151, 1201, 1223, 1249, 1429, 1447, 1483, 1511, 1601, 1609, 1627, 1663, 1753, 1861, 1933, 1951, 2011, 2099
Offset: 1
The sums of the digits of a(n) form the sequence d(n) = 2, 2, 4, 8, 4, 8, 8, 16, ... in which either d(n)/d(n+1) or d(n+1)/d(n) is an integer.
-
A178796 := proc(n) option remember; if n = 1 then 2; else a := nextprime(procname(n-1)) ; while true do r := A007953(a)/ A007953(procname(n-1)) ; if numer(r) = 1 or denom(r) = 1 then return a; end if; a := nextprime(a) ; end do: end if; end proc:
seq(A178796(n),n=1..80) ; # R. J. Mathar, Jun 28 2010
-
nxt[n_]:=Module[{k=NextPrime[n],tidn=Total[IntegerDigits[n]]},While[ !Divisible[ Total[ IntegerDigits[ k]],tidn] && !Divisible[ tidn,Total[ IntegerDigits[k]]],k=NextPrime[k]];k]; NestList[nxt,2,60] (* Harvey P. Dale, Aug 23 2017 *)
Definition corrected, sequence extended, example added by
R. J. Mathar, Jun 28 2010
A261456
Prime numbers whose sum of digits is not a power of 2.
Original entry on oeis.org
3, 5, 7, 19, 23, 29, 37, 41, 43, 47, 59, 61, 67, 73, 83, 89, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 239, 241, 257, 263, 269, 271, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 353, 359, 373
Offset: 1
-
[p: p in PrimesUpTo(400) | not PrimeDivisors(s) eq [2] where s is &+Intseq(p)]; // Vincenzo Librandi, Aug 19 2015
-
Select[Prime@Range[80], !IntegerQ[Log[2, Plus@@IntegerDigits[#]]] &] (* Vincenzo Librandi, Aug 19 2015 *)
-
lista(nn) = forprime (n=1, nn, sd = sumdigits(n); if (2^valuation(sd,2) != sd, print1(n, ", "))); \\ Michel Marcus, Aug 19 2015
A308163
Numbers for which the sum of the digits of any divisor is a power of 2.
Original entry on oeis.org
1, 2, 4, 8, 11, 13, 17, 22, 26, 31, 44, 53, 62, 71, 79, 88, 97, 101, 103, 107, 121, 143, 169, 187, 202, 206, 211, 233, 242, 251, 277, 286, 341, 349, 367, 404, 422, 431, 439, 457, 466, 484, 503, 521, 547, 583, 619, 673, 682, 691, 701, 709, 727, 781, 808, 844
Offset: 1
Divisors(8) = {1, 2, 4, 8} with sums of digits respectively 1, 2, 4, 8, powers of 2.
Divisors(13) = {1, 13} with sums of digits 1 and 4, powers of 2 .
Divisors(286) = {1, 2, 11, 13, 22, 26, 143, 286} with sums of digits respectively 1, 2, 2, 4, 4, 8, 16, powers of 2.
-
sol:=[]; m:=1;for n in [1..850] do nr:=#[d: d in Divisors(n) | PrimeDivisors(&+Intseq(d)) eq [2]]; if nr eq #Divisors(n)-1 then sol[m]:=n; m:=m+1; end if; end for; sol;
-
ispp(n) = (n==1) || (isprimepower(n, &p) && (p==2));
isok(n) = fordiv(n, d, if (!ispp(sumdigits(d)), return (0))); return (1); \\ Michel Marcus, Jun 12 2019
Showing 1-3 of 3 results.
Comments