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.
%I A226785 #32 Mar 14 2023 09:21:18 %S A226785 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, %T A226785 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, %U A226785 49,25,17,43,35,9,0 %N A226785 If n=0 (mod 7) then a(n)=0, otherwise a(n)=7^(-1) in Z/nZ*. %H A226785 Charles R Greathouse IV, <a href="/A226785/b226785.txt">Table of n, a(n) for n = 1..10000</a> %H A226785 <a href="/index/Rec#order_14">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -1). %F A226785 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 %F A226785 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 %p A226785 A226785 := proc(n) %p A226785 local x,a,m ; %p A226785 a := 7 ; %p A226785 m := 7 ; %p A226785 if igcd(n,m) > 1 or n =1 then %p A226785 0; %p A226785 else %p A226785 msolve(x*a=1,n) ; %p A226785 op(%) ; %p A226785 op(2,%) ; %p A226785 end if; %p A226785 end proc: # _R. J. Mathar_, Jun 28 2013 %t A226785 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}] %t A226785 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 *) %t A226785 Table[If[Mod[n, 7]==0, 0, ModularInverse[7, n]], {n, 1, 100}] (* _Jean-François Alcover_, Mar 14 2023 *) %o A226785 (PARI) a(n)=if(n%7,lift(Mod(1,n)/7),0) \\ _Charles R Greathouse IV_, Jun 18 2013 %Y A226785 Cf. A092092, A226782-A226787. %K A226785 nonn,easy %O A226785 1,4 %A A226785 _José María Grau Ribas_, Jun 18 2013