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

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)

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

Original entry on oeis.org

0, 1, 0, 1, 4, 0, 4, 1, 0, 9, 5, 0, 3, 11, 0, 9, 2, 0, 17, 9, 0, 5, 18, 0, 14, 3, 0, 25, 13, 0, 7, 25, 0, 19, 4, 0, 33, 17, 0, 9, 32, 0, 24, 5, 0, 41, 21, 0, 11, 39, 0, 29, 6, 0, 49, 25, 0, 13, 46, 0, 34, 7, 0, 57, 29
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[9, n], {n, 1, 122}]
    (* Second program: *)
    Table[If[Mod[n, 3] == 0, 0, ModularInverse[9, n], 0], {n, 1, 100}] (* Jean-François Alcover, Mar 14 2023 *)
  • PARI
    a(n)=if(n%3,lift(Mod(1,n)/9),0) \\ Charles R Greathouse IV, Jun 18 2013

Formula

Empirical g.f.: -x^2*(x^17-x^14-3*x^12-x^11-3*x^9-9*x^8-x^6-4*x^5-4*x^3-x^2-1) / (x^18 -2*x^9 +1). - Colin Barker, Jun 20 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-3 of 3 results.