cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A014261 Numbers that contain odd digits only.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 31, 33, 35, 37, 39, 51, 53, 55, 57, 59, 71, 73, 75, 77, 79, 91, 93, 95, 97, 99, 111, 113, 115, 117, 119, 131, 133, 135, 137, 139, 151, 153, 155, 157, 159, 171, 173, 175, 177, 179, 191, 193, 195, 197, 199, 311, 313, 315, 317, 319
Offset: 1

Views

Author

Keywords

Comments

Or, numbers whose product of digits is odd.
Complement of A007928; A196563(a(n)) = 0. - Reinhard Zumkeller, Oct 04 2011
If n is represented as a zerofree base-5 number (see A084545) 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) = 1, 3, 5, 7, 9 for k = 1..5. - Hieronymus Fischer, Jun 06 2012

Examples

			a(10^3) = 13779.
a(10^4) = 397779.
a(10^5) = 11177779.
a(10^6) = 335777779.
		

Crossrefs

Subsequence of A059708 and of A225985. A066640 and A030096 are subsequences.

Programs

  • Haskell
    a014261 n = a014261_list !! (n-1)
    a014261_list = filter (all (`elem` "13579") . show) [1,3..]
    -- Reinhard Zumkeller, Jul 05 2011
    
  • Magma
    [ n : n in [1..129] | IsOdd(&*Intseq(n,10)) ];
    
  • Mathematica
    Select[Range[400], OddQ[Times@@IntegerDigits[#]] &] (* Alonso del Arte, Feb 21 2014 *)
  • PARI
    is(n)=Set(digits(n)%2)==[1] \\ Charles R Greathouse IV, Jul 06 2017
    
  • PARI
    a(n)={my(k=1); while(n>5^k, n-=5^k; k++); fromdigits([2*d+1 | d<-digits(5^k+n-1, 5)]) - 3*10^k} \\ Andrew Howroyd, Jan 17 2020
    
  • Python
    from itertools import islice, count
    def A014261(): return filter(lambda n: set(str(n)) <= {'1','3','5','7','9'}, count(1,2))
    A014261_list = list(islice(A014261(),20)) # Chai Wah Wu, Nov 22 2021
    
  • Python
    from itertools import count, islice, product
    def agen(): yield from (int("".join(p)) for d in count(1) for p in product("13579", repeat=d))
    print(list(islice(agen(), 60))) # Michael S. Branicky, Jan 13 2022

Formula

A121759(a(n)) = a(n); A000035(A007959(a(n))) = 1. - Reinhard Zumkeller, Nov 30 2007
From Reinhard Zumkeller, Aug 30 2009: (Start)
a(n+1) - a(n) = A164898(n). - Reinhard Zumkeller, Aug 30 2009
a(n+1) = h(a(n)) with h(x) = 1 + (if x mod 10 < 9 then x + x mod 2 else 10*h(floor(x/10)));
a(n) = f(n, 1) where f(n, x) = if n = 1 then x else f(n-1, h(x)). (End)
From Hieronymus Fischer, Jun 06 2012: (Start)
a(n) = Sum_{j = 0..m-1} ((2*b_j(n)+1) mod 10)*10^j, where b_j(n) = floor((4*n+1-5^m)/(4*5^j)), m = floor(log_5(4*n+1)).
a(1*(5^n-1)/4) = 1*(10^n-1)/9.
a(2*(5^n-1)/4) = 1*(10^n-1)/3.
a(3*(5^n-1)/4) = 5*(10^n-1)/9.
a(4*(5^n-1)/4) = 7*(10^n-1)/9.
a(5*(5^n-1)/4) = 10^n - 1.
a((5^n-1)/4 + 5^(n-1)-1) = (10^n-5)/5.
a(n) = (10^log_5(4*n+1)-1)/9 for n = (5^k-1)/4, k > 0.
a(n) < (10^log_5(4*n+1)-1)/9 for (5^k-1)/4 < n < (5^(k+1)-1)/4, k > 0.
a(n) <= 27/(9*2^log_5(9)-1)*(10^log_5(4*n+1)-1)/9 for n > 0, equality holds for n = 2.
a(n) > 0.776*10^log_5(4*n+1)-1)/9 for n > 0.
a(n) >= A001742(n), equality holds for n = (5^k-1)/4, k > 0.
a(n) = A084545(n) if and only if all digits of A084545(n) are 1, else a(n) > A084545(n).
G.f.: g(x)= (x^(1/4)*(1-x))^(-1) Sum_{j >= 0} 10^j*z(j)^(5/4)*(1-z(j))*(1 + 3*z(j) + 5*z(j)^2 + 7*z(j)^3 + 9*z(j)^4)/(1-z(j)^5), where z(j) = x^5^j.
Also: g(x) = (1/(1-x))*(h_(5,0)(x) + 2*h_(5,1)(x) + 2*h_(5,2)(x) + 2*h_(5,3)(x) + 2*h_(5,4)(x) - 9*h_(5,5)(x)), where h_(5,k)(x) = Sum_{j >= 0} 10^j*x^((5^(j+1)-1)/4)*(x^5^j)^k/(1-(x^5^j)^5). (End)
a(n) = A225985(A226091(n)). - Reinhard Zumkeller, May 26 2013
Sum_{n>=1} 1/a(n) = A194181. - Bernard Schott, Jan 13 2022

Extensions

More terms from Robert G. Wilson v, Oct 18 2002
Examples and crossrefs added by Hieronymus Fischer, Jun 06 2012

A194182 Decimal expansion of the (finite) value of Sum_{ k >= 1, k has no odd digit in base 10 } 1/k.

Original entry on oeis.org

1, 9, 6, 2, 6, 0, 8, 4, 1, 2, 9, 9, 4, 6, 1, 6, 9, 8, 5, 1, 5, 9, 1, 5, 4, 2, 6, 4, 7, 3, 7, 2, 9, 4, 3, 5, 6, 7, 1, 2, 8, 3, 0, 6, 6, 5, 5, 1, 4, 4, 3, 5, 3, 5, 4, 6, 7, 1, 5, 2, 2, 2, 3, 5, 8, 6, 6, 5, 7, 6, 0, 9, 5, 2, 7, 4, 3, 2, 9, 2, 7, 1, 3, 4, 6, 8, 2, 4, 1, 7, 1, 7, 3, 8, 2, 6, 1, 2, 7, 0, 4
Offset: 1

Views

Author

Robert G. Wilson v, Aug 18 2011

Keywords

Examples

			1.96260841299461698515915426473729435671283066551443535467152223586...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[kSum[{1, 3, 5, 7, 9}, 120 ]][[1]] (* Amiram Eldar, Jun 15 2023, using Baillie and Schmelzer's kempnerSums.nb, see Links *)

Formula

Equals Sum_{n>=2} 1/A014263(n). - Bernard Schott, Jan 13 2022

A258271 Decimal expansion of the sum of the reciprocal of the squares of the numbers whose digits are all even.

Original entry on oeis.org

0, 3, 6, 6, 3, 6, 0, 0, 3, 9, 7, 1, 9, 5, 2, 3, 2, 9, 5, 1, 7, 1, 8, 8, 2, 5, 0, 8, 9, 6, 7, 4, 1, 2, 4, 2, 6, 6, 2, 5, 1, 7, 3, 9, 5, 0, 3, 4, 2, 1, 1, 8, 7, 6, 0, 0, 2, 0, 0, 7, 1, 1, 3, 5, 0, 8, 5, 2, 8, 3, 3, 3, 2, 9, 3, 4, 9, 5, 1, 5, 7, 5, 8, 4, 4, 6, 5
Offset: 1

Views

Author

Paolo P. Lava, May 25 2015

Keywords

Comments

A rational approximation (correct up to the 9th decimal digit) is 22781/62182.
Continued fraction: [0, 2, 1, 2, 1, 2, 3, 3, 1, 8, 5, 2, 1, 14,...].

Examples

			Decimal expansion of Sum_{k=1..oo}{1/A045926(k)^2} = 1/2^2 + 1/4^2 + 1/6^2 + 1/8^2 + 1/22^2 + 1/24^2 + 1/26^2 + ... = 0.3663600397195232951718825089674124266251739503421187600...
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,b,k,ok,n; a:=0; for n from 2 by 2 to q do ok:=1; b:=n;
    for k from 1 to ilog10(n)+1 do if (b mod 10)=0 or ((b mod 10) mod 2)=1 then ok:=0;
    break; else b:=trunc(b/10); fi; od; if ok=1 then a:=a+(1/n)^2; fi; od;
    print(evalf(a,200)); end: P(10^9);
Showing 1-3 of 3 results.