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.

A109684 Ternary equivalents of A109682.

Original entry on oeis.org

2, 21, 220, 2222, 22211, 222210, 2222212, 22222201, 222222200, 2222222202, 22222222221, 222222222120, 2222222222122, 22222222222111, 222222222222110, 2222222222222112, 22222222222222101, 222222222222222100
Offset: 1

Views

Author

Philippe Deléham, Aug 08 2005

Keywords

A109681 "Sloping ternary numbers": write numbers in ternary under each other (right-justified), read diagonals in upward direction, convert to decimal.

Original entry on oeis.org

0, 1, 5, 3, 4, 8, 6, 16, 11, 9, 10, 14, 12, 13, 17, 15, 25, 20, 18, 19, 23, 21, 22, 26, 51, 34, 29, 27, 28, 32, 30, 31, 35, 33, 43, 38, 36, 37, 41, 39, 40, 44, 42, 52, 47, 45, 46, 50, 48, 49, 53, 78, 61, 56, 54, 55, 59, 57, 58, 62, 60, 70, 65, 63, 64, 68, 66
Offset: 0

Views

Author

Philippe Deléham, Aug 08 2005

Keywords

Comments

All terms are distinct, but certain terms (see A109682) are missing.
For the terms 3^k-1 (all 2's in ternary), the diagonal is not started at the leading 2, but at the leading 1 of the following term. - Georg Fischer, Mar 13 2020

Examples

			number diagonal decimal
    0      0     0
    1      1     1
    2     12     5
   10     10     3
   11     11     4
   12     22     8
   20     20     6
   21    121    16
   22    102    11
  100    100     9
  101    101    10
  102    112    14
  110    110    12
  11.    ...   ...
  1.
  .
		

Crossrefs

Cf. A109682 (complement), A109683 (ternary version), A109684.
Cf. A102370 (base 2), A325644 (base 4), A325645 (base 5), A325692 (base 6), A325693 (base 7), A325805 (base 8), A325829 (base 9), A103205 (base 10).
Cf. A030341.

Programs

  • Haskell
    a109681 n = a109681_list !! n
    a109681_list = map (foldr (\d v -> 3 * v + d) 0) $ f a030341_tabf where
       f vss = (g 0 vss) : f (tail vss)
       g k (ws:wss) = if k < length ws then ws !! k : g (k + 1) wss else []
    -- Reinhard Zumkeller, Nov 19 2013
    
  • Maple
    t:= (n, i)-> (d-> `if`(i=0, d, t(m, i-1)))(irem(n, 3, 'm')):
    b:= (n, i)-> `if`(3^i>n, 0, t(n,i) +3*b(n+1, i+1)):
    a:= n-> b(n, 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 13 2020
  • Perl
    Cf. link.

Extensions

Conjectured g.f. and recurrence removed by Georg Fischer, Mar 13 2020

A215694 a(n) = 5*a(n-1) - 6*a(n-2) + a(n-3) with a(0)=1, a(1)=2, a(2)=7.

Original entry on oeis.org

1, 2, 7, 24, 80, 263, 859, 2797, 9094, 29547, 95968, 311652, 1011999, 3286051, 10669913, 34645258, 112492863, 365262680, 1186001480, 3850924183, 12503874715, 40599829957, 131826825678, 428039023363, 1389833992704, 4512762649020, 14652848312239, 47577499659779, 154483171074481, 501603705725970, 1628697001842743
Offset: 0

Views

Author

Roman Witula, Aug 21 2012

Keywords

Comments

The Berndt-type sequence number 9 for the argument 2Pi/7 defined by the first trigonometric relation from section "Formula". For more connections with another sequences of trigonometric nature see comments to A215512 (a(n) is equal to the sequence b(n) in these comments) and Witula-Slota's reference (Section 3). We note that a(n)=A109682(n) for n=1,2,3,4. Moreover the following summation formula hold true: sum{k=3,..,n} a(k) = 5*a(n-1) - a(n-2) - 9, for every n=3,4,... - see comments to A215512.
The inverse binomial transform is 1,1, 4, 8, 19, 42, 95,... essentially a shifted, unsigned variant of A215112. - R. J. Mathar, Aug 22 2012

Examples

			We have 10*a(3) = 3*a(4), a(0)+a(1)+3*a(2) = a(3), a(0)+a(2)+3*a(3) = a(4), a(1)+3*a(2)+3*a(4) = a(5), and a(6) = 3*a(5)+3*a(4)-a(1).
		

Crossrefs

Programs

  • Magma
    I:=[1,2,7]; [n le 3 select I[n] else 5*Self(n-1) - 6*Self(n-2) + Self(n-3): n in [1..30]]; // G. C. Greubel, Apr 25 2018
  • Mathematica
    LinearRecurrence[{5,-6,1}, {1,2,7}, 50]
  • PARI
    Vec((1-3*x+3*x^2)/(1-5*x+6*x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Oct 01 2012
    

Formula

sqrt(7)*a(n) = s(4)*c(1)^(2*n) + s(1)*c(2)^(2*n) + s(2)*c(4)^(2*n), where c(j):=2*cos(2*Pi*j/7) and s(j):=2*sin(2*Pi*j/7).
G.f.: (1-3*x+3*x^2)/(1-5*x+6*x^2-x^3).
a(n) = A005021(n)-3*A005021(n-1)+3*A005021(n-2). - R. J. Mathar, Aug 22 2012

A109683 Ternary equivalents of A109681.

Original entry on oeis.org

0, 1, 12, 10, 11, 22, 20, 121, 102, 100, 101, 112, 110, 111, 122, 120, 221, 202, 200, 201, 212, 210, 211, 222, 1220, 1021, 1002, 1000, 1001, 1012, 1010, 1011, 1022, 1020, 1121, 1102, 1100, 1101, 1112, 1110, 1111, 1122, 1120, 1221, 1202, 1200
Offset: 0

Views

Author

Philippe Deléham, Aug 08 2005

Keywords

Comments

a(n) = A007089(A109681(n)). - Reinhard Zumkeller, Nov 19 2013

Crossrefs

Programs

Showing 1-4 of 4 results.