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-5 of 5 results.

A084544 Alternate number system in base 4.

Original entry on oeis.org

1, 2, 3, 4, 11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44, 111, 112, 113, 114, 121, 122, 123, 124, 131, 132, 133, 134, 141, 142, 143, 144, 211, 212, 213, 214, 221, 222, 223, 224, 231, 232, 233, 234, 241, 242, 243, 244, 311, 312, 313, 314, 321
Offset: 1

Views

Author

Robert R. Forslund (forslund(AT)tbaytel.net), Jun 27 2003

Keywords

Examples

			From _Hieronymus Fischer_, Jun 06 2012: (Start)
a(100)  = 1144.
a(10^3) = 33214.
a(10^4) = 2123434.
a(10^5) = 114122134.
a(10^6) = 3243414334.
a(10^7) = 211421121334.
a(10^8) = 11331131343334.
a(10^9) = 323212224213334. (End)
		

Crossrefs

Programs

  • Python
    def A084544(n):
        m = (3*n+1).bit_length()-1>>1
        return int(''.join((str(((3*n+1-(1<<(m<<1)))//(3<<((m-1-j)<<1))&3)+1) for j in range(m)))) # Chai Wah Wu, Feb 08 2023

Formula

From Hieronymus Fischer, Jun 06 and Jun 08 2012: (Start)
The formulas are designed to calculate base-10 numbers only using the digits 1..4.
a(n) = Sum_{j=0..m-1} (1 + b(j) mod 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(k*(4^n-1)/3) = k*(10^n-1)/9, k = 1,2,3,4.
a((7*4^n-4)/3) = (13*10^n-4)/9 = 10^n + 4*(10^n-1)/9.
a((4^n-1)/3 - 1) = 4*(10^(n-1)-1)/9, n > 1.
Inequalities:
a(n) <= (10^log_4(3*n+1)-1)/9, equality holds for n=(4^k-1)/3, k>0.
a(n) > (4/10)*(10^log_4(3*n+1)-1)/9, n > 0.
Lower and upper limits:
lim inf a(n)/10^log_4(3*n) = 2/45, for n --> infinity.
lim sup a(n)/10^log_4(3*n) = 1/9, for n --> infinity.
G.f.: g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(1 - 5z(j)^4 + 4z(j)^5)/((1-z(j))(1-z(j)^4)), where z(j) = x^4^j.
Also: g(x) = (1/(1-x)) Sum_{j>=0} (1-5(x^4^j)^4 + 4(x^4^j)^5)*x^4^j*f_j(x)/(1-x^4^j), where f_j(x) = 10^j*x^((4^j-1)/3)/(1-(x^4^j)^4). The f_j obey the recurrence f_0(x) = 1/(1-x^4), f_(j+1)(x) = 10x*f_j(x^4).
Also: g(x) = (1/(1-x))* (h_(4,0)(x) + h_(4,1)(x) + h_(4,2)(x) + h_(4,3)(x) - 4*h_(4,4)(x)), where h_(4,k)(x) = Sum_{j>=0} 10^j*x^((4^(j+1)-1)/3) * (x^4^j)^k/(1-(x^4^j)^4).
(End)
a(n) = A045926(n) / 2. - Reinhard Zumkeller, Jan 01 2013

Extensions

Offset set to 1 according to A007931, A007932 by Hieronymus Fischer, Jun 06 2012

A192370 Sum of all the n-digit numbers whose digits are all even and nonzero: 2,4,6,8.

Original entry on oeis.org

20, 880, 35520, 1422080, 56888320, 2275553280, 91022213120, 3640888852480, 145635555409920, 5825422221639680, 233016888886558720, 9320675555546234880, 372827022222184939520, 14913080888888739758080, 596523235555554959032320, 23860929422222219836129280
Offset: 1

Views

Author

Bernard Schott, Dec 31 2012

Keywords

Comments

A192107 is the similar sequence when all the digits are odd.
A220094 is the similar sequence with the digits belonging to {1, 2, 3, 4, 5, 6, 7, 8, 9}.

Examples

			a(1) = 2 + 4 + 6 + 8 = 20.
a(2) = 22 + 24 + 26 + 28 + 42 + ... + 68 + 82 + 84 + 86 + 88 = 880.
		

Crossrefs

Programs

  • Maple
    A:=seq(5 * 4^n *(10^n-1)/9,n=1..20);
  • Mathematica
    Table[(5*4^n*(10^n - 1))/9, {n, 20}] (* T. D. Noe, Dec 31 2012 *)
  • PARI
    a(n)=(5*4^n*(10^n-1))/9 \\ Charles R Greathouse IV, Jul 06 2017

Formula

a(n) = (5 * 4^n * (10^n-1))/9.
From Colin Barker, Jan 04 2013: (Start)
a(n) = 44*a(n-1) - 160*a(n-2).
G.f.: 20*x/((4*x-1)*(40*x-1)). (End)

A045927 Digits even, nonzero and nondecreasing.

Original entry on oeis.org

2, 4, 6, 8, 22, 24, 26, 28, 44, 46, 48, 66, 68, 88, 222, 224, 226, 228, 244, 246, 248, 266, 268, 288, 444, 446, 448, 466, 468, 488, 666, 668, 688, 888, 2222, 2224, 2226, 2228, 2244, 2246, 2248, 2266, 2268, 2288, 2444, 2446, 2448, 2466, 2468, 2488, 2666, 2668
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

More terms from Patrick De Geest, Jun 15 1999

A137103 Numbers k such that k and k^2 use only the digits 2, 4, 6 and 8.

Original entry on oeis.org

2, 8, 22, 68, 262, 668, 6668, 66668, 666668, 6666668, 66666668, 666666668, 6666666668, 66666666668, 666666666668, 6666666666668, 66666666666668, 666666666666668, 6666666666666668, 66666666666666668, 666666666666666668, 6666666666666666668, 66666666666666666668
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008

Keywords

Comments

Generated with DrScheme.
From Bernard Schott, May 04 2022: (Start)
All terms end with 2 or 8, because when k ends with 4 or 6, the tens digit of k^2 is always odd.
Squares are a subsequence of A103751.
This sequence is infinite because terms of the form 8, 68, 668, 6668, ..., have respectively squares equal to 64, 4624, 446224, 44462224, ... In fact, if m = (10^k+20)/15 and k >= 2, then m^2 has successively (k-2) 4's, one 6, (k-2) 2's, and one 4 in its decimal representation; hence, A073555 \ {1} is a subsequence. (End)

Examples

			262^2 = 68644.
		

Crossrefs

Subsequence of A045926.

Extensions

a(19) and beyond from Michael S. Branicky, May 04 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-5 of 5 results.