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

A092092 Back and Forth Summant S(n, 3): a(n) = Sum{i=0..floor(2n/3)} (n-3i).

Original entry on oeis.org

1, 1, 0, 3, 2, 0, 5, 3, 0, 7, 4, 0, 9, 5, 0, 11, 6, 0, 13, 7, 0, 15, 8, 0, 17, 9, 0, 19, 10, 0, 21, 11, 0, 23, 12, 0, 25, 13, 0, 27, 14, 0, 29, 15, 0, 31, 16, 0, 33, 17, 0, 35, 18, 0, 37, 19, 0, 39, 20, 0, 41, 21, 0, 43, 22, 0, 45, 23, 0, 47, 24, 0, 49, 25, 0, 51, 26, 0, 53, 27, 0, 55, 28
Offset: 1

Views

Author

Jahan Tuten (jahant(AT)indiainfo.com), Mar 29 2004

Keywords

Comments

The terms for n>1 can also be defined by: a(n)=0 if n==0 (mod 3), and otherwise a(n) equals the inverse of 3 in Z/nZ*. - José María Grau Ribas, Jun 18 2013
The subsequence of nonzero terms is essentially the same as A026741. - Giovanni Resta, Jun 18 2013

References

  • F. Smarandache, Back and Forth Summants, Arizona State Univ., Special Collections, 1972.

Crossrefs

Other values of k: A000004 (k = 1, 2), A027656 (k = 4), A092093 (k = 5).
Cf. A226782 - A226787 for inverses of 4,5,6,.. in Z/nZ*.

Programs

  • Maple
    f:= proc(n) local t;
    t:= n mod 3;
    if t = 0 then 0 elif t = 1 then 2/3*(n+1/2) else (n+1)/3 fi
    end proc:
    map(f, [$1..100]); # Robert Israel, May 19 2016
  • Mathematica
    LinearRecurrence[{0, 0, 2, 0, 0, -1}, {1, 1, 0, 3, 2, 0}, 100] (* Jean-François Alcover, Jun 04 2020 *)
  • PARI
    S(n, k=3) = local(s, x); s = n; x = n - k; while (x >= -n, s = s + x; x = x - k); s;

Formula

a(3n) = 0; a(3n+1) = 2n+1; a(3n+2) = n+1.
G.f.: x*(1+x+x^3) / ( (x-1)^2*(1+x+x^2)^2 ). - R. J. Mathar, Jun 26 2013
a(n) = Sum_{k=1..n} k*( floor((3k-1)/n)-floor((3k-2)/n) ). - Anthony Browne, May 17 2016

Extensions

Edited and extended by David Wasserman, Dec 19 2005

A226782 If n == 0 (mod 2) then a(n) = 0, otherwise a(n) = 4^(-1) in Z/nZ*.

Original entry on oeis.org

0, 0, 1, 0, 4, 0, 2, 0, 7, 0, 3, 0, 10, 0, 4, 0, 13, 0, 5, 0, 16, 0, 6, 0, 19, 0, 7, 0, 22, 0, 8, 0, 25, 0, 9, 0, 28, 0, 10, 0, 31, 0, 11, 0, 34, 0, 12, 0, 37, 0, 13, 0, 40, 0, 14, 0, 43, 0, 15, 0, 46, 0, 16, 0, 49, 0, 17
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A226782 := proc(n)
        local x ,a,m;
        a := 4 ;
        m := 2 ;
        if n mod m = 0 or n = 1 then
            0;
        else
            msolve(x*a=1,n) ;
            op(%) ;
            op(2,%) ;
        end if;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    Inv[a_, mod_] := Which[mod == 1, 0, GCD[a, mod] > 1, 0, True, Last@Reduce[a*x == 1, x, Modulus -> mod]]; Table[Inv[4, n], {n, 1, 122}]
    (* Second program: *)
    Table[If[EvenQ[n], 0, ModularInverse[4, n], 0], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
  • PARI
    a(n)=if(n%2,lift(Mod(1, n)/4),0) \\ Charles R Greathouse IV, Jun 18 2013

Formula

From Colin Barker, Jun 20 2013: (Start)
G.f.: -x^3*(x^6 - 4*x^2 - 1) / ( (x-1)^2*(1+x)^2*(x^2+1)^2 ).
a(2n+1) = A225126(n+1). (End)

A226786 If n=0 (mod 2) then a(n)=0, otherwise a(n)=8^(-1) in Z/nZ*.

Original entry on oeis.org

0, 0, 2, 0, 2, 0, 1, 0, 8, 0, 7, 0, 5, 0, 2, 0, 15, 0, 12, 0, 8, 0, 3, 0, 22, 0, 17, 0, 11, 0, 4, 0, 29, 0, 22, 0, 14, 0, 5, 0, 36, 0, 27, 0, 17, 0, 6, 0, 43, 0, 32, 0, 20, 0, 7, 0, 50, 0, 37, 0, 23, 0, 8, 0, 57, 0, 42
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Inv[a_, mod_] := Which[mod == 1,0, GCD[a, mod] > 1, 0, True, Last@Reduce[a*x == 1, x, Modulus -> mod]];Table[Inv[8, n], {n, 1, 122}]
    (* Second program: *)
    Table[If[EvenQ[n], 0, ModularInverse[8, n], 0], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
  • PARI
    a(n)=if(n%2,lift(Mod(1,n)/8),0) \\ Charles R Greathouse IV, Jun 18 2013

Formula

G.f.: -x^3*(x^14-x^10-3*x^8-8*x^6-x^4-2*x^2-2)/(x^16-2*x^8+1). - Colin Barker, Jun 20 2013

A226783 If n=0 (mod 5) then a(n)=0, otherwise a(n)=5^(-1) in Z/nZ*.

Original entry on oeis.org

0, 1, 2, 1, 0, 5, 3, 5, 2, 0, 9, 5, 8, 3, 0, 13, 7, 11, 4, 0, 17, 9, 14, 5, 0, 21, 11, 17, 6, 0, 25, 13, 20, 7, 0, 29, 15, 23, 8, 0, 33, 17, 26, 9, 0, 37, 19, 29, 10, 0, 41, 21, 32, 11, 0, 45, 23, 35, 12, 0, 49, 25, 38
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A226783 := proc(n)
        local x ;
        a := 5 ;
        m := 5 ;
        if n mod m = 0 or n = 1 then
            0;
        else
            msolve(x*a=1,n) ;
            op(%) ;
            op(2,%) ;
        end if;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    Inv[a_, mod_] := Which[mod == 1,0, GCD[a, mod] > 1, 0, True, Last@Reduce[a*x == 1, x, Modulus -> mod]];Table[Inv[5, n], {n, 1, 122}]
    CoefficientList[Series[-x^2(x^9-x^6-x^5-5x^4-x^2-2x-1)/((x-1)^2 (x^4+ x^3+ x^2+ x+ 1)^2),{x,0,120}],x] (* Harvey P. Dale, Oct 08 2016 *)
    Table[If[Mod[n, 5]==0, 0, ModularInverse[5, n]], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
  • PARI
    a(n)=if(n%5,lift(Mod(1, n)/5),0) \\ Charles R Greathouse IV, Jun 18 2013

Formula

G.f.: -x^2*(x^9-x^6-x^5-5*x^4-x^2-2*x-1) / ( (x-1)^2*(x^4+x^3+x^2+x+1)^2 ). - Colin Barker, Jun 20 2013
a(5n+1) = A016813(n), n>0. a(5n+2)= A005408(n), n>0. a(5n+3) = A016789(n). a(5n+4)=n+1. - R. J. Mathar, Jun 28 2013
a(n) = Sum_{k=1..n} k*(floor((5k-1)/n)-floor((5k-2)/n)), n>1. - Anthony Browne, Jun 19 2016

A226785 If n=0 (mod 7) then a(n)=0, otherwise a(n)=7^(-1) in Z/nZ*.

Original entry on oeis.org

0, 1, 1, 3, 3, 1, 0, 7, 4, 3, 8, 7, 2, 0, 13, 7, 5, 13, 11, 3, 0, 19, 10, 7, 18, 15, 4, 0, 25, 13, 9, 23, 19, 5, 0, 31, 16, 11, 28, 23, 6, 0, 37, 19, 13, 33, 27, 7, 0, 43, 22, 15, 38, 31, 8, 0, 49, 25, 17, 43, 35, 9, 0
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A226785 := proc(n)
        local x,a,m ;
        a := 7 ;
        m := 7 ;
        if igcd(n,m) > 1 or n =1 then
            0;
        else
            msolve(x*a=1,n) ;
            op(%) ;
            op(2,%) ;
        end if;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    Inv[a_, mod_] := Which[mod == 1,0, GCD[a, mod] > 1, 0, True, Last@Reduce[a*x == 1, x, Modulus -> mod]];Table[Inv[7, n],{n, 1, 122}]
    Join[{0},LinearRecurrence[{0,0,0,0,0,0,2,0,0,0,0,0,0,-1},{1,1,3,3,1,0,7,4,3,8,7,2,0,13},70]] (* Harvey P. Dale, Nov 15 2014 *)
    Table[If[Mod[n, 7]==0, 0, ModularInverse[7, n]], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
  • PARI
    a(n)=if(n%7,lift(Mod(1,n)/7),0) \\ Charles R Greathouse IV, Jun 18 2013

Formula

G.f.: -x^2*(x^13 -x^10 -2*x^9 -x^8 -2*x^7 -7*x^6 -x^4 -3*x^3 -3*x^2 -x -1) / (x^14 -2*x^7 +1). a(n) = 2*a(n-7)-a(n-14). - Colin Barker, Jun 20 2013
a(7n+1) = 6*n+1, n>0. a(7n+2)=A016777(n). a(7n+3) = A005408(n). a(7n+4) = A016885(n). a(7n+5)= A004767(n). a(7n+6)= n+1. - R. J. Mathar, Jun 28 2013

A226784 If gcd(n,6) != 1 then a(n)=0, otherwise a(n)=6^(-1) in Z/nZ*.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 2, 0, 11, 0, 0, 0, 3, 0, 16, 0, 0, 0, 4, 0, 21, 0, 0, 0, 5, 0, 26, 0, 0, 0, 6, 0, 31, 0, 0, 0, 7, 0, 36, 0, 0, 0, 8, 0, 41, 0, 0, 0, 9, 0, 46, 0, 0, 0, 10, 0, 51, 0, 0, 0, 11, 0, 56, 0, 0
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A226784 := proc(n)
        local x,a,m ;
        a := 6 ;
        m := 6 ;
        if igcd(n,m) > 1 or n =1 then
            0;
        else
            msolve(x*a=1,n) ;
            op(%) ;
            op(2,%) ;
        end if;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    Inv[a_, mod_] := Which[mod == 1,0, GCD[a, mod] > 1, 0, True, Last@Reduce[a*x == 1, x, Modulus -> mod]];Table[Inv[6, n], {n, 1, 122}]
    (* Second program: *)
    Table[If[GCD[n, 6] != 1, 0, ModularInverse[6, n], 0], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
  • PARI
    a(n)=if(gcd(n,6)>1,0,lift(Mod(1,n)/6)) \\ Charles R Greathouse IV, Jun 18 2013

Formula

G.f.: -x^5*(x^8-6*x^2-1) / (x^12-2*x^6+1). a(n) = 2*a(n-6)-a(n-12). - Colin Barker, Jun 20 2013
a(6n+1) = A016861(n), n>0. a(6n+2) = a(6n+3) = a(6n+4) = 0. a(6n+5)=n+1. - R. J. Mathar, Jun 28 2013
a(n) = Sum_{k=1..n} k*(floor((6k-1)/n)-floor((6k-2)/n)), n>1. - Anthony Browne, Jun 19 2016

Extensions

Name corrected by David A. Corneth, Jun 20 2016
Showing 1-6 of 6 results.