Displaying 1-8 of 8 results found.
page
1
Numbers whose digits are primes.
+10
103
2, 3, 5, 7, 22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 222, 223, 225, 227, 232, 233, 235, 237, 252, 253, 255, 257, 272, 273, 275, 277, 322, 323, 325, 327, 332, 333, 335, 337, 352, 353, 355, 357, 372, 373, 375, 377, 522, 523, 525, 527, 532
COMMENTS
If n is represented as a zerofree base-4 number (see A084544) according to n=d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n) = Sum_{j=0..m} c(d(j))*10^j, where c(k)=2,3,5,7 for k=1..4. - Hieronymus Fischer, May 30 2012
According to A153025, it seems that 5, 235 and 72335 are the only terms whose square is also a term, i.e., which are also in the sequence A275971 of square roots of the terms which are squares, listed in A191486. - M. F. Hasler, Sep 16 2016
FORMULA
a(n) = Sum_{j=0..m-1} ((2*b(j)+1) mod 8 + floor(b(j)/4) - floor((b(j)-1)/4))*10^j, where m = floor(log_4(3*n+1)), b(j) = floor((3*n+1-4^m)/(3*4^j)).
Special values:
a(1*(4^n-1)/3) = 2*(10^n-1)/9.
a(2*(4^n-1)/3) = 1*(10^n-1)/3.
a(3*(4^n-1)/3) = 5*(10^n-1)/9.
a(4*(4^n-1)/3) = 7*(10^n-1)/9.
Inequalities:
a(n) <= 2*(10^log_4(3*n+1)-1)/9, equality holds for n = (4^k-1)/3, k>0.
a(n) <= 2* A084544(n), equality holds iff all digits of A084544(n) are 1.
Lower and upper limits:
lim inf a(n)/10^log_4(n) = (7/90)*10^log_4(3) = 0.48232167706987..., for n -> oo.
lim sup a(n)/10^log_4(n) = (2/9)*10^log_4(3) = 1.378061934485343..., for n -> oo.
where 10^log_4(n) = n^1.66096404744...
G.f.: g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(2 + z(j) + 2*z(j)^2 + 2*z(j)^3 - 7*z(j)^4)/(1-z(j)^4), where z(j) = x^4^j.
Also g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(1-z(j))*(2 + 3*z(j) + 5*z(j)^2 + 7*z(j)^3)/(1-z(j)^4), where z(j)=x^4^j.
Also: g(x) = (1/(1-x))*(2*h_(4,0)(x) + h_(4,1)(x) + 2*h_(4,2)(x) + 2*h_(4,3)(x) - 7*h_(4,4)(x)), where h_(4,k)(x) = Sum_{j>=0} 10^j*x^((4^(j+1)-1)/3)*x^(k*4^j)/(1-x^4^(j+1)). (End)
Sum_{n>=1} 1/a(n) = 1.857333779940977502574887651449435985318556794733869779170825138954093657197... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024
EXAMPLE
a(100) = 2277,
a(10^3) = 55327,
a(9881) = 3233232,
a(10^4) = 3235757,
a(10922) = 3333333,
a(10^5) = 227233257.
MATHEMATICA
Table[FromDigits /@ Tuples[{2, 3, 5, 7}, n], {n, 3}] // Flatten (* Michael De Vlieger, Sep 19 2016 *)
PROG
(Haskell)
a046034 n = a046034_list !! (n-1)
a046034_list = filter (all (`elem` "2357") . show ) [0..]
(Magma) [n: n in [2..532] | Set(Intseq(n)) subset [2, 3, 5, 7]]; // Bruno Berselli, Jul 19 2011
(Python)
m = (3*n+1).bit_length()-1>>1
return int(''.join(('2357'[(3*n+1-(1<<(m<<1)))//(3<<((m-1-j)<<1))&3] for j in range(m)))) # Chai Wah Wu, Feb 08 2023
CROSSREFS
Cf. A046035, A118950, A019546 (primes), A203263, A035232, A039996, A085823, A052382, A084544, A084984, A017042, A001743, A001744, A014261, A014263, A153025, A191486, A193238, A202267, A202268, A211681, A365471 (complement).
Numbers that contain even digits only.
+10
65
0, 2, 4, 6, 8, 20, 22, 24, 26, 28, 40, 42, 44, 46, 48, 60, 62, 64, 66, 68, 80, 82, 84, 86, 88, 200, 202, 204, 206, 208, 220, 222, 224, 226, 228, 240, 242, 244, 246, 248, 260, 262, 264, 266, 268, 280, 282, 284, 286, 288, 400, 402, 404, 406, 408, 420, 422, 424
COMMENTS
The set of real numbers between 0 and 1 that contain no odd digits in their decimal expansion has Hausdorff dimension log 5 / log 10.
The carryless mod 10 "even" numbers (cf. A004529) sorted and duplicates removed. - N. J. A. Sloane, Aug 03 2010.
If n-1 is represented as a base-5 number (see A007091) according to n-1 = d(m)d(m-1)…d(3)d(2)d(1)d(0) then a(n)= Sum_{j=0..m} c(d(j))*10^j, where c(k)=0,2,4,6,8 for k=0..4. - Hieronymus Fischer, Jun 03 2012
REFERENCES
K. J. Falconer, The Geometry of Fractal Sets, Cambridge, 1985; p. 19.
FORMULA
a(n) = ((2*b_m(n)) mod 8 + 2)*10^m + Sum_{j=0..m-1} ((2*b_j(n)) mod 10)*10^j, where n>1, b_j(n) = floor((n-1-5^m)/5^j), m = floor(log_5(n-1)).
a(1*5^n+1) = 2*10^n.
a(2*5^n+1) = 4*10^n.
a(3*5^n+1) = 6*10^n.
a(4*5^n+1) = 8*10^n.
a(n) = 2*10^log_5(n-1) for n=5^k+1,
a(n) < 2*10^log_5(n-1), else.
a(n) > (8/9)*10^log_5(n-1) n>1.
G.f.: g(x) = (x/(1-x))*Sum_{j>=0} 10^j*x^5^j *(1-x^5^j)* (2+4x^5^j+ 6(x^2)^5^j+ 8(x^3)^5^j)/(1-x^5^(j+1)).
Also: g(x) = 2*(x/(1-x))*Sum_{j>=0} 10^j*x^5^j * (1-4x^(3*5^j)+3x^(4*5^j))/((1-x^5^j)(1-x^5^(j+1))).
Also: g(x) = 2*(x/(1-x))*(h_(5,1)(x) + h_(5,2)(x) + h_(5,3)(x) + h_(5,4)(x) - 4*h_(5,5)(x)), where h_(5,k)(x) = Sum_{j>=0} 10^j*(x^5^j)^k/(1-(x^5^j)^5). (End)
a(5*n+i-4) = 10*a(n) + 2*i for n >= 1, i=0..4. - Robert Israel, Apr 07 2016
EXAMPLE
a(1000) = 24888.
a(10^4) = 60888.
a(10^5) = 22288888.
a(10^6) = 446888888.
MAPLE
a:= proc(m) local L, i;
L:= convert(m-1, base, 5);
2*add(L[i]*10^(i-1), i=1..nops(L))
end proc:
MATHEMATICA
Select[Range[450], And@@EvenQ[IntegerDigits[#]]&] (* Harvey P. Dale, Jan 30 2011 *)
PROG
(Haskell)
a014263 n = a014263_list !! (n-1)
a014263_list = filter (all (`elem` "02468") . show) [0, 2..]
(Magma) [n: n in [0..424] | Set(Intseq(n)) subset [0..8 by 2]]; // Bruno Berselli, Jul 19 2011
(Python)
from sympy.ntheory.digits import digits
def a(n): return int(''.join(str(2*d) for d in digits(n, 5)[1:]))
(Python)
from itertools import count, islice, product
def agen(): # generator of terms
yield 0
for d in count(1):
for first in "2468":
for rest in product("02468", repeat=d-1):
yield int(first + "".join(rest))
(PARI) a(n) = 2*fromdigits(digits(n-1, 5), 10); \\ Michel Marcus, Nov 04 2022
CROSSREFS
Cf. A061810, A061811, A007091, A014261, A046034, A052382, A084544, A089581, A084984, A017042, A001743, A202267, A202268, A194182, A196563.
Numbers containing no prime digits.
+10
31
0, 1, 4, 6, 8, 9, 10, 11, 14, 16, 18, 19, 40, 41, 44, 46, 48, 49, 60, 61, 64, 66, 68, 69, 80, 81, 84, 86, 88, 89, 90, 91, 94, 96, 98, 99, 100, 101, 104, 106, 108, 109, 110, 111, 114, 116, 118, 119, 140, 141, 144, 146, 148, 149, 160, 161, 164, 166, 168, 169
COMMENTS
If n-1 is represented as a base-6 number (see A007092) according to n-1=d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n)= sum_{j=0..m} c(d(j))*10^j, where c(k)=0,1,4,6,8,9 for k=0..5. - Hieronymus Fischer, May 30 2012
FORMULA
a(n) = ((2*b_m(n)+1) mod 10 + floor((b_m(n)+4)/5) - floor((b_m(n)+1)/5))*10^m + sum_{j=0..m-1} ((2*b_j(n))) mod 12 + floor(b_j(n)/6) - floor((b_j(n)+1)/6) + floor((b_j(n)+4)/6) - floor((b_j(n)+5)/6)))*10^j, where n>1, b_j(n)) = floor((n-1-6^m)/6^j), m = floor(log_6(n-1)).
Special values:
a(1*6^n+1) = 1*10^n.
a(2*6^n+1) = 4*10^n.
a(3*6^n+1) = 6*10^n.
a(4*6^n+1) = 8*10^n.
a(5*6^n+1) = 9*10^n.
a(2*6^n) = 2*10^n - 1.
a(n) = 10^log_6(n-1) for n=6^k+1, k>0.
Inequalities:
a(n) < 10^log_6(n-1) for 6^k+1<n<=2*6^k, k>0.
a(n) > 10^log_6(n-1) for 2*6^k<n<=6*6^k, k>=0.
a(n) <= 4*10^(log_6(n-1)-log_6(2)) = 1.641372618*10^(log_6(n-1)), equality holds for n=2*6^k+1, k>=0.
a(n) > 2*10^(log_6(n-1)-log_6(2)) = 0.820686309*10^(log_6(n-1)).
a(n) >= A202267(n), equality holds if the representation of n-1 as a base-6 number has only digits 0 or 1.
Lower and upper limits:
lim inf a(n)/10^log_6(n) = 2/10^log_6(2) = 0.820686309, for n --> inf.
lim sup a(n)/10^log_6(n) = 4/10^log_6(2) = 1.641372618, for n --> inf.
where 10^log_6(n) = n^1.2850972089...
G.f.: g(x) = (x/(1-x))*sum_{j>=0} 10^j*x^6^j * (1-x^6^j)*((1+x^6^j)^4 + 4(1+2x^6^j) * x^(3*6^j))/(1-x^6^(j+1)).
Also: g(x) = (x/(1-x))*(h_(6,1)(x) + 3*h_(6,2)(x) + 2*h_(6,3)(x) + 2*h_(6,4)(x) + h_(6,5)(x) - 9*h_(6,6)(x)), where h_(6,k)(x) = sum_{j>=0} 10^j*x^(k*6^j)/(1-x^6^(j+1)). (End)
Sum_{n>=2} 1/a(n) = 3.614028405471074989720026361356036456697082276983705341077940360653303099111... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024
EXAMPLE
166 has digits 1 and 6 and they are nonprime digits.
a(1000) = 8686.
a(10^4) = 118186
a(10^5) = 4090986.
a(10^6) = 66466686.
MATHEMATICA
npdQ[n_]:=And@@Table[FreeQ[IntegerDigits[n], i], {i, {2, 3, 5, 7}}]; Select[ Range[ 0, 200], npdQ] (* Harvey P. Dale, Jul 22 2013 *)
PROG
(Haskell)
a084984 n = a084984_list !! (n-1)
a084984_list = filter (not . any (`elem` "2357") . show ) [0..]
(Magma) [n: n in [0..169] | forall{d: d in [2, 3, 5, 7] | d notin Set(Intseq(n))}]; // Bruno Berselli, Jul 19 2011
AUTHOR
Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 27 2003
Numbers n such that every digit contains a loop (version 2).
+10
26
0, 4, 6, 8, 9, 40, 44, 46, 48, 49, 60, 64, 66, 68, 69, 80, 84, 86, 88, 89, 90, 94, 96, 98, 99, 400, 404, 406, 408, 409, 440, 444, 446, 448, 449, 460, 464, 466, 468, 469, 480, 484, 486, 488, 489, 490, 494, 496, 498, 499, 600, 604, 606, 608, 609, 640, 644, 646
COMMENTS
If n-1 is represented as a base-5 number (see A007091) according to n-1 = d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n)= Sum_{j=0..m} c(d(j))*10^j, where c(k)=0,4,6,8,9 for k=0..4. - Hieronymus Fischer, May 30 2012
FORMULA
a(n) = ((2*b_m(n)) mod 8 + 4 + floor(b_m(n)/4) - floor((b_m(n)+1)/4))*10^m + sum_{j=0..m-1} ((2*b_j(n))) mod 10 + 2*floor((b_j(n)+4)/5) - floor((b_j(n)+1)/5) -floor(b_j(n)/5)))*10^j, where n>1, b_j(n)) = floor((n-1-5^m)/5^j), m = floor(log_5(n-1)).
a(1*5^n+1) = 4*10^n.
a(2*5^n+1) = 6*10^n.
a(3*5^n+1) = 8*10^n.
a(4*5^n+1) = 9*10^n.
a(n) = 4*10^log_5(n-1) for n=5^k+1,
a(n) < 4*10^log_5(n-1), otherwise.
a(n) > 10^log_5(n-1) n>1.
G.f.: g(x) = (x/(1-x))*sum_{j>=0} 10^j*x^5^j*(1-x^5^j)*(4 + 6x^5^j + 8(x^2)^5^j + 9(x^3)^5^j)/(1-x^5^(j+1)).
Also: g(x) = (x/(1-x))*(4*h_(5,1)(x) + 2*h_(5,2)(x) + 2*h_(5,3)(x) + h_(5,4)(x) - 9*h_(5,5)(x)), where h_(5,k)(x) = sum_{j>=0} 10^j*(x^5^j)^k/(1-(x^5^j)^5). (End)
EXAMPLE
a(1000) = 46999.
a(10^4) = 809999.
a(10^5) = 44499999.
a(10^6) = 668999999.
MATHEMATICA
FromDigits/@Tuples[{0, 4, 6, 8, 9}, 3] (* Harvey P. Dale, Aug 16 2018 *)
PROG
(PARI) is(n) = #setintersect(vecsort(digits(n), , 8), [1, 2, 3, 5, 7])==0 \\ Felix Fröhlich, Sep 09 2019
CROSSREFS
Cf. A061371, A029581, A007091, A046034, A084544, A084984, A017042, A001743, A014261, A014263, A202267, A202268.
EXTENSIONS
Ambiguous comment deleted by Zak Seidov, May 25 2010
Numbers in which every digit contains at least one loop (version 1).
+10
24
0, 6, 8, 9, 60, 66, 68, 69, 80, 86, 88, 89, 90, 96, 98, 99, 600, 606, 608, 609, 660, 666, 668, 669, 680, 686, 688, 689, 690, 696, 698, 699, 800, 806, 808, 809, 860, 866, 868, 869, 880, 886, 888, 889, 890, 896, 898, 899, 900, 906, 908, 909, 960, 966, 968, 969
COMMENTS
If n-1 is represented as a base-4 number (see A007090) according to n-1 = d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n) = Sum_{j=0..m} c(d(j))*10^j, where c(k)=0,6,8,9 for k=0..3. - Hieronymus Fischer, May 30 2012
FORMULA
a(n) = ((b_m(n)+6) mod 9 + floor((b_m(n)+2)/3) - floor(b_m(n)/3))*10^m + Sum_{j=0..m-1} (b_j(n) mod 4 +5*floor((b_j(n)+3)/4) +floor((b_j(n)+2)/4)- 6*floor(b_j(n)/4)))*10^j, where n>1, b_j(n)) = floor((n-1-4^m)/4^j), m = floor(log_4(n-1)).
a(1*4^n+1) = 6*10^n.
a(2*4^n+1) = 8*10^n.
a(3*4^n+1) = 9*10^n.
a(n) = 6*10^log_4(n-1) for n=4^k+1,
a(n) < 6*10^log_4(n-1), otherwise.
a(n) > 10^log_4(n-1) for n>1.
G.f.: g(x) = (x/(1-x))*Sum_{j>=0} 10^j*x^4^j *(1-x^4^j)* (6 + 8x^4^j + 9(x^2)^4^j)/(1-x^4^(j+1)).
Also: g(x) = (x/(1-x))*(6*h_(4,1)(x) + 2*h_(4,2)(x) + h_(4,3)(x) - 9*h_(4,4)(x)), where h_(4,k)(x) = Sum_{j>=0} 10^j*(x^4^j)^k/(1-(x^4^j)^4). (End)
EXAMPLE
a(1000) = 99896.
a(10^4) = 8690099.
a(10^5) = 680688699.
MATHEMATICA
Union[Flatten[Table[FromDigits/@Tuples[{0, 6, 8, 9}, n], {n, 3}]]] (* Harvey P. Dale, Sep 04 2013 *)
PROG
(PARI) is(n) = #setintersect(vecsort(digits(n), , 8), [1, 2, 3, 4, 5, 7])==0 \\ Felix Fröhlich, Sep 09 2019
Numbers in which all digits are composite.
+10
10
4, 6, 8, 9, 44, 46, 48, 49, 64, 66, 68, 69, 84, 86, 88, 89, 94, 96, 98, 99, 444, 446, 448, 449, 464, 466, 468, 469, 484, 486, 488, 489, 494, 496, 498, 499, 644, 646, 648, 649, 664, 666, 668, 669, 684, 686, 688, 689, 694, 696, 698, 699, 844, 846, 848
COMMENTS
If n is represented as a zerofree base-4 number (see A084544) according to n=d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n) = Sum_{j=0..m} c(d(j))*10^j, where c(k)=4,6,8,9 for k=1..4. - Hieronymus Fischer, May 30 2012
FORMULA
a(n) = Sum_{j=0..m-1} (2*b(j) mod 8 + 4 + floor(b(j)/4) - floor((b(j)+1)/4))*10^j, where m = floor(log_4(3*n+1)), b(j) = floor((3*n+1-4^m)/(3*4^j)).
Special values:
a(1*(4^n-1)/3) = 4*(10^n-1)/9.
a(2*(4^n-1)/3) = 2*(10^n-1)/3.
a(3*(4^n-1)/3) = 8*(10^n-1)/9.
a(4*(4^n-1)/3) = 10^n-1.
a(n) < 4*(10^log_4(3*n+1)-1)/9, equality holds for n=(4^k-1)/3, k > 0.
a(n) < 4* A084544(n), equality holds iff all digits of A084544(n) are 1.
Lower and upper limits:
lim inf a(n)/10^log_4(n) = 1/10*10^log_4(3) = 0.62127870, for n --> inf.
lim sup a(n)/10^log_4(n) = 4/9*10^log_4(3) = 2.756123868970, for n --> inf.
where 10^log_4(n) = n^1.66096404744...
G.f.: g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(1-z(j))*(4 + 6z(j) + 8*z(j)^2 + 9*z(j)^3)/(1-z(j)^4), where z(j) = x^4^j.
Also: g(x) = (1/(1-x))*(4*h_(4,0)(x) + 2*h_(4,1)(x) + 2*h_(4,2)(x) + h_(4,3)(x) - 9*h_(4,4)(x)), where h_(4,k)(x) = Sum_{j>=0} 10^j*x^((4^(j+1)-1)/3)*(x^(k*4^j)/(1-x^4^(j+1)). (End)
Sum_{n>=1} 1/a(n) = 1.039691381254753739202528087006945643166147087095114911673083135126969046250... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024
EXAMPLE
a(1000) = 88649.
a(10^4) = 6468989
a(10^5) = 449466489. (End)
MATHEMATICA
Table[FromDigits/@Tuples[{4, 6, 8, 9}, n], {n, 3}] // Flatten (* Vincenzo Librandi, Dec 17 2018 *)
PROG
(Magma) [n: n in [1..1000] | Set(Intseq(n)) subset [4, 6, 8, 9]]; // Vincenzo Librandi, Dec 17 2018
CROSSREFS
Cf. A002808, A001744, A046034, A084544, A084984, A017042, A001743, A014261, A014263, A202267, A202268.
25, 196, 529, 1024, 1681, 2500, 3481, 4624, 5929, 7396, 9025, 10816, 12769, 14884, 17161, 19600, 22201, 24964, 27889, 30976, 34225, 37636, 41209, 44944, 48841, 52900, 57121, 61504, 66049, 70756
FORMULA
G.f.: (25 + 121*x + 16*x^2)/(1-x)^3. - R. J. Mathar, Mar 20 2018
a(n) = a(n-1) + 9*(18*n + 1).
E.g.f.: (25 + 171*x + 81*x^2)*exp(x). (End)
MATHEMATICA
(9Range[0, 30]+5)^2 (* or *) LinearRecurrence[{3, -3, 1}, {25, 196, 529}, 30] (* Harvey P. Dale, May 22 2012 *)
PROG
(SageMath) [(9*n+5)^2 for n in range(41)] # G. C. Greubel, Dec 29 2022
CROSSREFS
Sequences of the form (m*n+5)^2: A010864 (m=0), A000290 (m=1), A016754 (m=2), A016790 (m=3), A016814 (m=4), A016850 (m=5), A016970 (m=6), A017042 (m=7), A017126 (m=8), this sequence (m=9), A017330 (m=10), A017450 (m=11), A017582 (m=12).
Numbers that have more prime digits than nonprime digits.
+10
5
2, 3, 5, 7, 22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 122, 123, 125, 127, 132, 133, 135, 137, 152, 153, 155, 157, 172, 173, 175, 177, 202, 203, 205, 207, 212, 213, 215, 217, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232
COMMENTS
Begins to differ from A046034 at the 21st term (which is the first 3-digit term).
EXAMPLE
133 is in the sequence as the prime digits are 3 and 3 (those are two digits; counted with multiplicity) and one nonprime digit 1 and so there are more prime digits than nonprime digits. - David A. Corneth, Sep 06 2020
PROG
(PARI) is(n) = my(d = digits(n), c = 0); for(i = 1, #d, if(isprime(d[i]), c++)); c<<1 > #d \\ David A. Corneth, Sep 06 2020
(Python)
from itertools import count, islice
def A085557_gen(startvalue=1): # generator of terms
return filter(lambda n:len(s:=str(n))<(sum(1 for d in s if d in {'2', '3', '5', '7'})<<1), count(max(startvalue, 1)))
CROSSREFS
Cf. A193238, A046034, A046035, A118950, A019546, A203263, A035232, A039996, A085823, A052382, A084544, A084984, A017042, A001743, A001744, A014261, A014263, A202267, A202268, A211681.
Search completed in 0.010 seconds
|