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.

Previous Showing 41-43 of 43 results.

A047469 Numbers that are congruent to {0, 1, 2} mod 8.

Original entry on oeis.org

0, 1, 2, 8, 9, 10, 16, 17, 18, 24, 25, 26, 32, 33, 34, 40, 41, 42, 48, 49, 50, 56, 57, 58, 64, 65, 66, 72, 73, 74, 80, 81, 82, 88, 89, 90, 96, 97, 98, 104, 105, 106, 112, 113, 114, 120, 121, 122, 128, 129, 130, 136, 137, 138, 144, 145, 146, 152, 153, 154
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A030341.
Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [0..2]]; // Wesley Ivan Hurt, Jun 09 2016
  • Maple
    A047469:=n->(24*n-39-15*cos(2*n*Pi/3)+5*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047469(n), n=1..100); # Wesley Ivan Hurt, Jun 09 2016
  • Mathematica
    Select[Range[0, 150], MemberQ[{0, 1, 2}, Mod[#, 8]] &] (* Wesley Ivan Hurt, Jun 09 2016 *)
  • PARI
    a(n)=n+(n-1)\3*5-1
    

Formula

G.f.: x*(1 + x + 6*x^2)/((1 - x)*(1 - x^3)).
a(n+1) = Sum_{k>=0} A030341(n,k)*b(k) with b(0)=1 and b(k) = 8*3^(k-1) for k>0. - Philippe Deléham, Oct 24 2011
From Wesley Ivan Hurt, Jun 09 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (24*n-39-15*cos(2*n*Pi/3)+5*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 8k-6, a(3k-1) = 8k-7, a(3k-2) = 8k-8. (End)
a(n) = n + 5*floor((n-1)/3) - 1. - Bruno Berselli, Feb 06 2017

A262412 A262411 in ternary representation.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 22 2015

Keywords

Comments

a(n) = A007089(A262411(n)).

Examples

			See A262411.
		

Crossrefs

Programs

  • Haskell
    import Data.List (inits, tails, intersect, delete)
    a262412 n = a262412_list !! (n - 1)
    a262412_list = 1 : f [1] (drop 2 a030341_tabf) where
       f xs tss = g tss where
         g (ys:yss) | null (intersect its $ tail $ inits ys) &&
                      null (intersect tis $ init $ tails ys) = g yss
                    | otherwise = (foldr (\t v -> 10 * v + t) 0 ys) :
                                  f ys (delete ys tss)
         its = init $ tails xs; tis = tail $ inits xs
    -- Reinhard Zumkeller, Sep 22 2015

A038555 Derivative of n in base 3.

Original entry on oeis.org

0, 0, 0, 1, 2, 0, 2, 0, 1, 3, 4, 5, 7, 8, 6, 2, 0, 1, 6, 7, 8, 1, 2, 0, 5, 3, 4, 9, 10, 11, 13, 14, 12, 17, 15, 16, 21, 22, 23, 25, 26, 24, 20, 18, 19, 6, 7, 8, 1, 2, 0, 5, 3, 4, 18, 19, 20, 22, 23, 21, 26, 24, 25, 3, 4, 5, 7, 8, 6, 2, 0, 1, 15, 16, 17, 10, 11, 9, 14, 12, 13, 27, 28, 29
Offset: 0

Views

Author

Keywords

Examples

			15 = 120 in ternary, derivative is 02 = 2, so a(15)=2.
		

Crossrefs

Cf. A038554.
Cf. A030341.

Programs

  • Haskell
    a038555 n = foldr (\d v -> v * 3 + d) 0 $
       zipWith (\x y -> (x + y) `mod` 3) ts $ tail ts
       where ts = a030341_row n
    -- Reinhard Zumkeller, May 26 2013
    
  • J
    ab3 =: 3&#.^:_1
    sp =: 2&(+/\)"1
    > (3 | sp)&.ab3&.> ;/ i. 100 NB. Stephen Makdisi, May 26 2018
  • Mathematica
    Table[FromDigits[Mod[Total[#],3]&/@Partition[IntegerDigits[n,3],2,1],3],{n,0,100}] (* Harvey P. Dale, Nov 01 2024 *)

Formula

Write n in ternary, replace each pair of adjacent digits by their modulo 3 sum.

Extensions

More terms from Erich Friedman
Formula corrected by Reinhard Zumkeller, May 26 2013
Previous Showing 41-43 of 43 results.