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

A261234 a(n) = number of steps to reach (3^n)-1 when starting from k = (3^(n+1))-1 and repeatedly applying the map that replaces k with k - (sum of digits in base-3 representation of k).

Original entry on oeis.org

1, 2, 5, 12, 29, 74, 196, 530, 1445, 3956, 10862, 29901, 82592, 229233, 639967, 1797288, 5073707, 14381347, 40890492, 116559600, 333043360, 953890490, 2738788806, 7881915828, 22729464587, 65652788211, 189866467219, 549596773550, 1592118137130, 4615680732717, 13392399641613, 38894563977633, 113074467549440, 329080350818600, 958725278344368, 2795854777347489
Offset: 0

Views

Author

Antti Karttunen, Aug 13 2015

Keywords

Crossrefs

First differences of A261232 and A261233.
Sum of A261236 and A261237.
Cf. A261235 (first differences of this sequence).
Cf. also A213709.

Programs

  • Mathematica
    Table[Length@ NestWhileList[# - Total@ IntegerDigits[#, 3] &, 3^(n + 1) - 1, # > 3^n - 1 &] - 1, {n, 0, 16}] (* Michael De Vlieger, Jun 27 2016 *)

Formula

a(n) = A261236(n) + A261237(n).

Extensions

a(23)-a(35) from Hiroaki Yamanouchi, Aug 16 2015

A260215 Expansion of chi(-q) * chi(q^9) / (chi(q) * chi(-q^9)) in powers of q where chi() is a Ramanujan theta function.

Original entry on oeis.org

1, -2, 2, -4, 6, -8, 12, -16, 22, -28, 36, -48, 60, -76, 96, -120, 150, -184, 228, -280, 340, -416, 504, -608, 732, -878, 1052, -1252, 1488, -1768, 2088, -2464, 2902, -3408, 3996, -4672, 5460, -6364, 7400, -8600, 9972, -11544, 13344, -15400, 17752, -20424
Offset: 0

Views

Author

Michael Somos, Aug 13 2015

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 - 2*x + 2*x^2 - 4*x^3 + 6*x^4 - 8*x^5 + 12*x^6 - 16*x^7 + 22*x^8 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ q, q^2] QPochhammer[ q, -q] QPochhammer[ -q^9, q^18] QPochhammer[ -q^9, q^9], {q, 0, n}];
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A)^2 * eta(x^4 + A) * eta(x^18 + A)^3 / (eta(x^2 + A)^3 * eta(x^9 + A)^2 * eta(x^36 + A)), n))};

Formula

Expansion of psi(-q) * psi(q^9) / (psi(q) * psi(-q^9)) in powers of q where psi() is a Ramanujan theta function.
Expansion of eta(q)^2 * eta(q^4) * eta(q^18)^3 / (eta(q^2)^3 * eta(q^9)^2 * eta(q^36)) in powers of q.
Euler transform of period 36 sequence [ -2, 1, -2, 0, -2, 1, -2, 0, 0, 1, -2, 0, -2, 1, -2, 0, -2, 0, -2, 0, -2, 1, -2, 0, -2, 1, 0, 0, -2, 1, -2, 0, -2, 1, -2, 0, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (36 t)) = g(t) where q = exp(2 Pi i t) and g() is the g.f. of A128143.
a(n) = (-1)^n * A261156(n). Convolution inverse of A261156
a(2*n + 1) = -2 * A261203(n) = -2 * A261154(2*n + 1). 2 * a(2*n) = A261154(2*n) unless n=0.
a(3*n) = A261320(n). a(3*n + 1) = -2 * A261325(n). a(3*n + 2) = 2 * A260057(n). - Michael Somos, Nov 08 2015
a(n) ~ (-1)^n * exp(2*Pi*sqrt(n)/3) / (2*sqrt(3)*n^(3/4)). - Vaclav Kotesovec, Nov 16 2017

A261236 a(n) = A261234(n) - A261237(n).

Original entry on oeis.org

0, 1, 3, 7, 16, 40, 104, 279, 758, 2071, 5678, 15609, 43035, 119139, 331616, 928572, 2614743, 7396880, 20999683, 59784414, 170615755, 488073987, 1399625614, 4023315793, 11590737827, 33452982391
Offset: 0

Views

Author

Antti Karttunen, Aug 16 2015

Keywords

Comments

a(n) = How many numbers whose base-3 representation begins with digit "1" are encountered before (3^n)-1 is reached when starting from k = (3^(n+1))-1 and repeatedly applying the map that replaces k by k - (sum of digits in base-3 representation of k).

Examples

			For n=2, we start from 3^(2+1) - 1 = 26 ("222" in base-3), and subtract 6 to get 20 ("202" in base-3), from which we subtract 4, to get 16 ("121" in base-3), from which we subtract 4, to get 12 ("110" in base-3), from which we subtract 2 to get 10 ("101" in base-3), from which we subtract 2 to get 8 ("22" in base-3), which is the end point of iteration. Of the numbers encountered, 16, 12 and 10 have base-3 representations beginning with digit "1", thus a(2) = 3.
		

Crossrefs

Programs

  • C
    /* Use the C-program given in A261234. */
    
  • Mathematica
    Table[Length@ # - First@ FirstPosition[#, k_ /; k != 2] &@ Map[First@ IntegerDigits[#, 3] &, #] &@ NestWhileList[# - Total@ IntegerDigits[#, 3] &, 3^(n + 1) - 1, # > 3^n - 1 &], {n, 0, 16}] (* Michael De Vlieger, Jun 27 2016, Version 10 *)
  • Scheme
    (define (A261236 n) (- (A261234 n) (A261237 n)))

Formula

a(n) = A261234(n) - A261237(n).

Extensions

Terms a(24) & a(25) from Antti Karttunen, Jun 27 2016

A261237 Number of steps needed when starting from (3^(n+1))-1 and repeatedly applying the map that replaces k with k - (sum of digits in base-3 representation of k) to encounter the first number whose base-3 representation begins with a digit other than 2.

Original entry on oeis.org

1, 1, 2, 5, 13, 34, 92, 251, 687, 1885, 5184, 14292, 39557, 110094, 308351, 868716, 2458964, 6984467, 19890809, 56775186, 162427605, 465816503, 1339163192, 3858600035, 11138726760, 32199805820
Offset: 0

Views

Author

Antti Karttunen, Aug 16 2015

Keywords

Comments

a(n) = How many numbers whose base-3 representation begins with digit "2" are encountered before (3^n)-1 is reached when starting from k = (3^(n+1))-1 and repeatedly applying the map that replaces k by k - (sum of digits in base-3 representation of k). Note that (3^n)-1 (in base-3: "222...", with digit "2" repeated n times) is not included in the count, although the starting point (3^(n+1))-1 is.

Examples

			For n=0, we start from 3^(0+1) - 1 = 2 (also "2" in base-3), and subtract 2 to get 0, which doesn't begin with 2, thus a(0) = 1.
For n=1, we start from 3^(1+1) - 1 = 8 ("22" in base-3), and subtract 2*2 = 4 to get 4 ("11" in base-3) which doesn't begin with 2, thus a(1) = 1.
For n=2, we start from 3^(2+1) - 1 = 26 ("222" in base-3), and subtract first 6 to get 20 ("202" in base-3), from which we subtract 4, to get 16 ("121" in base-3), so in two steps we have reached the first such number that does not begin with "2" in base-3, thus a(2) = 2.
		

Crossrefs

Programs

  • C
    /* Use the C-program given in A261234. */
    
  • Mathematica
    Flatten@ Table[FirstPosition[#, k_ /; k != 2] &@ Map[First@ IntegerDigits[#, 3] &, NestWhileList[# - Total@ IntegerDigits[#, 3] &, 3^(n + 1) - 1, # > 3^n - 1 &]] - 1, {n, 0, 16}] (* Michael De Vlieger, Jun 27 2016, Version 10 *)
  • PARI
    a(n)=my(k=3^(n+1)-1,t=2*3^n,s); while(k>=t, k-=sumdigits(k,3); s++); s \\ Charles R Greathouse IV, Aug 21 2015
  • Scheme
    (definec (A261237 n) (let loop ((k (- (A000244 (+ 1 n)) 1)) (s 0)) (if (< (A122586 k) 2) s (loop (* 2 (A054861 k)) (+ 1 s)))))
    

Extensions

Terms a(24) & a(25) from Antti Karttunen, Jun 27 2016
Showing 1-4 of 4 results.