A098683
Numbers n such that pi(n) = prime(d_1)*prime(d_2)*...*prime(d_k) where d_1 d_2 ... d_k is the decimal expansion of n.
Original entry on oeis.org
123, 5224, 11166, 51174, 172451, 546322, 14355351, 23539612, 23539621, 24322837, 122924349, 4575242147, 42256772524, 283186883151, 623286236455, 665318971119, 665318971191, 5257788212426, 27452719198281, 273643846355134, 787812731751347, 787812731751374
Offset: 1
122924349 is in the sequence because pi(122924349) = P(1)*P(2)*P(2)*P(9)*P(2)*P(4)*P(3)*P(4)*P(9) where P(i) is i-th prime.
-
Do[d=IntegerDigits[n];k=Length[d];If[ !MemberQ[d, 0]&&PrimePi[n]==Product[Prime[d[[j]]], {j, k}], Print[n]], {n, 230000000}]
A097228
Numbers n such that the product of digits of n equals the concatenation of pi(d)'s where d runs through the digits of n.
Original entry on oeis.org
27, 38, 127, 138, 289, 298, 1127, 1138, 1289, 1298, 11127, 11138, 11289, 11298, 111127, 111138, 111289, 111298, 1111127, 1111138, 1111289, 1111298, 11111127, 11111138, 11111289, 11111298, 111111127, 111111138, 111111289, 111111298
Offset: 1
298 is in the sequence because 2*9*8 = 144 = concatenate(pi(2), pi(9), pi(8)) = concatenate(1, 4, 4).
- Chai Wah Wu, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 11, 0, 0, 0, -10).
-
h[a_]:=(v1={};Do[l=Length[a];v1=Join[v1, IntegerDigits[a[[n]]]], {n, l}]; FromDigits[v1]);v={};Do[h1=IntegerDigits[n];l=Length[h1]; p=Product[h1[[k]], {k, l}];s=Sum[h1[[k]], {k, l}];If[p>0&& p==h[PrimePi[h1]], v=Append[v, n];Print[v]], {n, 300000000}]
LinearRecurrence[{0,0,0,11,0,0,0,-10},{27,38,127,138,289,298,1127,1138,1289,1298},30] (* Harvey P. Dale, Jan 01 2019 *)
-
from _future_ import division
A097228_list = [27,38] + [1000*(10**k-1)//9+d for k in range(20) for d in [127,138,289,298]] # Chai Wah Wu, Aug 10 2017
A099068
Numbers n such that n=P(d_1)*P(d_2)*...*P(d_k)+(P(d_1)+P(d_2)+...+P(d_k)) where d_1 d_2 ... d_k is the decimal expansion of n and P(i) is the i-th prime.
Original entry on oeis.org
23, 119, 428, 918, 1637682, 652827658771
Offset: 1
1637682 is in the sequence because 1637682=
P(1)*P(6)*P(3)*P(7)*P(6)*P(8)*P(2)+(P(1)+P(6)+P(3)+P(7)+P(6)+P(8)+P(2)).
- C. Rivera, Puzzle 279The Prime Puzzles & Problems connection.
-
Do[h=IntegerDigits[n];l=Length[h];If[ !MemberQ[h, 0]&&n==Product[Prime[h[[k]]], {k, l}]+Sum[Prime[h[[k]]], {k, l}], Print[n]], {n, 15000000}]
A099069
Numbers n such that n = prime(d_1*d_2*...*d_k) - phi(d_1 + d_2 + ... + d_k) where d_1 d_2 ... d_k is the decimal expansion of n.
Original entry on oeis.org
1, 2, 3, 19, 35497
Offset: 1
35497 is in the sequence because 35497 = prime(3*5*4*9*7) - phi(3 + 5 + 4 + 9 + 7).
- C. Rivera, Puzzle 279The Prime Puzzles & Problems connection.
-
Do[h=IntegerDigits[n];l=Length[h];If[ !MemberQ[h, 0]&&n==Prime[Product[h[[k]], {k, l}]]-EulerPhi[Sum[h[[k]], {k, l}]], Print[n]], {n, 6000000}]
A110070
Numbers n such that n=pi(d_1!*d_2!*...*d_k!) where d_1 d_2 ... d_k is the decimal expansion of n.
Original entry on oeis.org
0, 3, 34, 52, 2800414
Offset: 1
2800414 is in the sequence because 2800414=pi(2!*8!*0!*0!*4!*1!*4!).
A290675
For a given n, the nonzero digits of n are the prime indices for the factorization of n.
Original entry on oeis.org
14, 154, 1196, 66079, 279174, 302768895, 2249805789
Offset: 1
14 = 2*7, which are the 1st and 4th primes. 154 = 2*11*7 which are the 1st, 5th, and 4th primes, respectively. So use the digits of n (excluding zero) to find the corresponding primes, and the product of those primes equals n.
-
x = 10^7; (* this number is the upper end of the search *) Do[If[n == Times @@ Prime /@ DeleteCases[RealDigits[n][[1]], 0], Print[n]], {n, x}] (* or *)
up = 3*^9; ric[n_, e_, k_] := Block[{m=n, j=0}, If[k == 10, If[Most@ DigitCount[n] == e, Print@n; Sow@n], While[m < up, ric[m, Append[e, j], k+1]; j++; m *= Prime[k] ]]]; Sort@ Reap[ric[1, {}, 1]][[2, 1]] (* faster, Giovanni Resta, Aug 09 2017 *)
-
is(n) = my(d=digits(n), prd=1); for(k=1, #d, if(d[k]!=0, prd=prd*prime(d[k]))); prd==n \\ Felix Fröhlich, Aug 09 2017
-
from functools import reduce
from operator import mul
from itertools import combinations_with_replacement
A290675_list, lmax, ptuple = [], 12, (2,3,5,7,11,13,17,19,23)
for l in range(1,lmax+1):
for d in combinations_with_replacement(range(1,10),l):
n = reduce(mul,(ptuple[i-1] for i in d))
if n < 10**lmax and tuple(sorted((int(x) for x in str(n) if x != '0'))) == d:
A290675_list.append(n) # Chai Wah Wu, Aug 10 2017
A318298
Numbers whose set of decimal digits coincides with the set of the indices of their prime factors.
Original entry on oeis.org
12, 14, 154, 1196, 14112, 21888, 53625, 226512, 279174, 358435, 821142, 1222452, 1665664, 2228814, 2454375, 2614248, 2872116, 4425729, 5751746, 8653645, 9551256, 15261246, 19427226, 19644898, 19775998, 21271488, 27676935, 29591892, 29956212, 41878242, 45574144
Offset: 1
1196 is in the sequence because the prime factors are {2, 13, 23} = {prime(1), prime(6), prime(9)}, and 1196 contains the decimal digits 1, 6, 9.
-
with(numtheory):nn:=10^8:
for n from 1 to nn do:
lst:={}:d:=factorset(n):n0:=nops(d):
q:=convert(n,base,10):n1:=nops(q):
p:=product(‘q[i]’, ‘i’=1..n1):
if p<>0
then
for i from 1 to n1 do :
lst:=lst union {ithprime(q[i])}:
od:
if lst = d
then
print(n):
else
fi:fi:
od:
-
ok[n_] := Block[{f = First /@ FactorInteger[n], d}, Last@f < 24 && Min[d = Union@ IntegerDigits@ n] > 0 && Prime[d] == f]; Select[Range[10^6], ok] (* Giovanni Resta, Aug 24 2018 *)
A329711
Numbers n such that n = prime(d_1) * prime(d_2) * ... * prime(d_k), where n is a concatenation of d_1, d_2, ..., d_k.
Original entry on oeis.org
14, 154, 1196, 2127, 61411, 172482, 223227, 279174, 291318, 1233822, 1346235, 2681318, 3127010, 6541482, 9105217, 14216826, 15136418, 15454362, 17211896, 22442133, 24174129, 32693925, 35219085, 35523825, 51157348, 51431138, 57121662, 58935162, 91242978, 101721214
Offset: 1
14 = prime(1)*prime(4) = 2*7, so 14 is a term.
154 = prime(1)*prime(5)*prime(4) = 2*11*7, so 154 is a term.
2127 = prime(2)*prime(127) = 3*709, so 2127 is a term.
9105217 = prime(9)*prime(10)*prime(5)*prime(21)*prime(7), so 9105217 is a term.
-
ok[n_] := Block[{d = DigitCount@ n}, AllTrue[Range@ 9, IntegerExponent[n, Prime@ #] <= d[[#]] &]]; ric[v_, d_] := If[PrimeQ@ v, PrimePi@ v == FromDigits@ d, Block[ {r=False, p, m = Length@ d}, Do[ If[ d[[i + 1]] > 0, p = Prime@ FromDigits@ Take[d, i]; If[Mod[v, p] == 0 && (r = ric[v/p, Take[d, i - m]]), Break[]]], {i, m - 1}]; r]]; Select[ Range@ 300000, If[ok@# && ric[#, IntegerDigits@ #], Print@#; True, False] &] (* Giovanni Resta, Mar 12 2020 *)
A113735
Let prime(0) = 1 and f(n) = product prime(d), where d ranges over all the decimal digits of n. The sequence gives numbers n such that f(n) == 0 (mod n).
Original entry on oeis.org
1, 14, 17, 154, 1196, 26979, 66079, 279174, 1698619, 9397685, 302768895, 594963655, 2249805789, 6794867989, 9785759929, 75077778589, 67471872963495, 34976979277935695, 275776822479793635, 459267544887917766, 34678475798796583278525
Offset: 1
-
f[n_] := Times @@ (IntegerDigits[n] /. {0 -> 1, 1 -> 2, 2 -> 3, 3 -> 5, 4 -> 7, 5 -> 11, 6 -> 13, 7 -> 17, 8 -> 19, 9 -> 23}); Do[ If[ Mod[ f[n], n] == 0, Print[n]], {n, 10^8}]
A115078
Numbers k such that k = prime(1 + d_1)*prime(1 + d_2)*...*prime(1 + d_m), where d_1 d_2 ... d_m is the decimal expansion of k.
Original entry on oeis.org
171, 290, 2145, 3381, 74613, 10664845620, 14771330561681694, 2744819721528289762500
Offset: 1
290 is a term because 290 = p(1+2)*p(1+9)*p(1+0) = 5*29*2.
-
t={};Do[If[n==Times@@Prime[1+IntegerDigits@n], Print[n];AppendTo[t, n]], {n, 10^5}];t
-
is(n) = my(d=digits(n)); n==prod(i=1, #d, prime(1+d[i])) \\ Felix Fröhlich, Aug 12 2017
Showing 1-10 of 10 results.
Comments