[go: up one dir, main page]

login
Search: a017042 -id:a017042
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
OFFSET
1,1
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
LINKS
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
Eric Weisstein's World of Mathematics, Smarandache Sequences.
FORMULA
A055642(a(n)) = A193238(a(n)). - Reinhard Zumkeller, Jul 19 2011
From Hieronymus Fischer, Apr 20, May 30 and Jun 25 2012: (Start)
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)).
a(n) = Sum_{j=0..m-1} (A010877(A005408(b(j)) + A002265(b(j)) - A002265(b(j)-1))*10^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.
a(n) > A084544(n).
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
(PARI) is_A046034(n)=Set(isprime(digits(n)))==[1] \\ M. F. Hasler, Oct 12 2013
(Haskell)
a046034 n = a046034_list !! (n-1)
a046034_list = filter (all (`elem` "2357") . show ) [0..]
-- Reinhard Zumkeller, Jul 19 2011
(Magma) [n: n in [2..532] | Set(Intseq(n)) subset [2, 3, 5, 7]]; // Bruno Berselli, Jul 19 2011
(Python)
def A046034(n):
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
KEYWORD
nonn,base,easy
EXTENSIONS
More terms from Cino Hilliard, Aug 06 2006
Typo in second formula corrected by Hieronymus Fischer, May 12 2012
Two typos in example section corrected by Hieronymus Fischer, May 30 2012
STATUS
approved
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
OFFSET
1,2
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.
Integers written in base 5 and then doubled (in base 10). - Franklin T. Adams-Watters, Mar 15 2006
The carryless mod 10 "even" numbers (cf. A004529) sorted and duplicates removed. - N. J. A. Sloane, Aug 03 2010.
Complement of A007957; A196564(a(n)) = 0; A103181(a(n)) = 0. - Reinhard Zumkeller, Oct 04 2011
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
A045888(a(n)) = 0. - Reinhard Zumkeller, Aug 25 2009
a(n) = A179082(n) for n <= 25. - Reinhard Zumkeller, Jun 28 2010
From Hieronymus Fischer, Jun 06 2012: (Start)
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.
a(n) = 2*A007091(n-1), iff the digits of A007091(n-1) are 0 or 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
Sum_{n>=2} 1/a(n) = A194182. - Bernard Schott, Jan 13 2022
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:
seq(a(i), i=1..100); # Robert Israel, Apr 07 2016
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..]
-- Reinhard Zumkeller, Jul 05 2011
(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:]))
print([a(n) for n in range(58)]) # Michael S. Branicky, Jan 13 2022
(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))
print(list(islice(agen(), 58))) # Michael S. Branicky, Jan 13 2022
(PARI) a(n) = 2*fromdigits(digits(n-1, 5), 10); \\ Michel Marcus, Nov 04 2022
KEYWORD
nonn,base,easy
EXTENSIONS
Examples and crossrefs added by Hieronymus Fischer, Jun 06 2012
STATUS
approved
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
OFFSET
1,3
COMMENTS
Complement of A118950. - Reinhard Zumkeller, Jul 19 2011
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
LINKS
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
FORMULA
A193238(a(n)) = 0. - Reinhard Zumkeller, Jul 19 2011
a(n) >> n^1.285. - Charles R Greathouse IV, Feb 20 2012
From Hieronymus Fischer, May 30 and Jun 25 2012: (Start)
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) = A007092(n-1) iff the digits of A007092(n-1) are 0 or 1, a(n)>A007092(n-1), else.
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..]
-- Reinhard Zumkeller, Jul 19 2011
(Magma) [n: n in [0..169] | forall{d: d in [2, 3, 5, 7] | d notin Set(Intseq(n))}]; // Bruno Berselli, Jul 19 2011
(PARI) is(n)=isprime(eval(Vec(Str(n))))==0 \\ Charles R Greathouse IV, Feb 20 2012
KEYWORD
base,nonn
AUTHOR
Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 27 2003
EXTENSIONS
0 added by N. J. A. Sloane, Feb 02 2009
100 added by Arkadiusz Wesolowski, Mar 10 2011
Examples for n>=10^3 added by Hieronymus Fischer, May 30 2012
STATUS
approved
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
OFFSET
1,2
COMMENTS
See A001743 for the other version.
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
From Hieronymus Fischer, May 30 2012: (Start)
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.
a(n) = 4*A007091(n-1), iff the digits of A007091(n-1) are 0 or 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
KEYWORD
base,nonn,easy
EXTENSIONS
Ambiguous comment deleted by Zak Seidov, May 25 2010
Examples added by Hieronymus Fischer, May 30 2012
STATUS
approved
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
OFFSET
1,2
COMMENTS
See A001744 for the other version.
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
From Hieronymus Fischer, May 30 2012: (Start)
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.
a(n) = 6*A007090(n-1), iff the digits of A007090(n-1) are 0 or 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
KEYWORD
base,nonn,easy
EXTENSIONS
Examples added by Hieronymus Fischer, May 30 2012
STATUS
approved
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
OFFSET
1,1
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
LINKS
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
FORMULA
From Hieronymus Fischer, May 30 and Jun 25 2012: (Start)
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)).
Also: a(n) = Sum_{j=0..m-1} (A010877(2*b(j)) + 4 + A002265(b(j)) - A002265(b(j)+1))*10^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.
a(n) > 2*A084544(n).
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
From Hieronymus Fischer, May 30 2012: (Start)
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
KEYWORD
nonn,base
EXTENSIONS
Offset corrected by Arkadiusz Wesolowski, Oct 03 2011
STATUS
approved
a(n) = (9*n + 5)^2.
+10
5
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
OFFSET
0,1
FORMULA
a(n) = A017221(n)^2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, May 22 2012
G.f.: (25 + 121*x + 16*x^2)/(1-x)^3. - R. J. Mathar, Mar 20 2018
From G. C. Greubel, Dec 29 2022: (Start)
a(2*n+1) = 4*A017246(n).
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
(Magma) [(9*n+5)^2: n in [0..35]]; // Vincenzo Librandi, Jul 24 2011
(PARI) a(n)=(9*n+5)^2 \\ Charles R Greathouse IV, Jun 17 2017
(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).
KEYWORD
nonn,easy
STATUS
approved
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
OFFSET
1,1
COMMENTS
Begins to differ from A046034 at the 21st term (which is the first 3-digit term).
LINKS
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)))
A085557_list = list(islice(A085557_gen(), 20)) # Chai Wah Wu, Feb 08 2023
KEYWORD
nonn,easy,base
AUTHOR
Jason Earls, Jul 04 2003
STATUS
approved

Search completed in 0.010 seconds