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-10 of 16 results. Next

A122276 If b(n-1) + b(n-2) < n then a(n) = 0, otherwise a(n) = 1, where b(i) = A096535(i).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1
Offset: 2

Views

Author

Klaus Brockhaus, Aug 29 2006

Keywords

Comments

Conjecture: lim {n -> infinity} x_n / y_n = 1, where x_n is the number of j <= n such that A096535(j) = A096535(j-1) + A096535(j-2) and y_n is the number of j <= n such that A096535(j) = A096535(j-1) + A096535(j-2) - j. Computational support: x_n / y_n = 0.9999917 for n = 10^9.

Crossrefs

Programs

  • Mathematica
    f[s_] := f[s] = Append[s, Mod[s[[ -2]] + s[[ -1]], Length[s]]]; t = Nest[f, {1, 1}, 106]; s = {}; Do[AppendTo[s, If[t[[n]] + t[[n + 1]] < n + 1, 0, 1]], {n, 105}]; s (* Robert G. Wilson v Sep 02 2006 *)
  • PARI
    {m=107;a=1;b=1;for(n=2,m,d=divrem(a+b,n);print1(d[1],",");a=b;b=d[2])}

Formula

a(n) = floor((A096535(n-1)+A096535(n-2))/n)

A096274 Indices of zeros in A096535.

Original entry on oeis.org

2, 8, 13, 20, 25, 595, 1044, 7932, 74247, 14693476, 16766626, 24072338, 72643740, 1881945888, 3304284638, 5163731431, 5669949197, 16209038688, 23714508403, 56796564073, 181057353263, 323874989643, 406930606305, 539293061152, 1751203649485, 2136659012156
Offset: 1

Views

Author

Jim Nastos, Jun 24 2004

Keywords

Comments

Suggested by Leroy Quet.

Crossrefs

Cf. A096535: a(0) = a(1) = 1; a(n) = (a(n-1) + a(n-2)) mod n.
Cf. A132678.

Programs

  • C
    /* C program from Peter Pein */
    #include 
    main(int argc, char *argv[])
    { long long a0=1, a1=1, n=1, tmp, nmax;
    if (argc != 2) { fprintf(stderr,"%s n\ncalculates the indices of the first n zeros in A096535\n", argv[0]);
    return(1); }
    nmax=atol(argv[1]);
    while (nmax-- > 0) {
    while(a1 != 0) {
    tmp = (a0 + a1) % ++n; a0 = a1; a1 = tmp; }
    printf("%lld\n",n++); a1 = a0; a0 = 0; }
    return 0; }
    
  • Haskell
    import Data.List (elemIndices)
    a096274 n = a096274_list !! (n-1)
    a096274_list = elemIndices 0 a096535_list
    -- Reinhard Zumkeller, Oct 19 2011
  • Mathematica
    a = b = 1; lst = {}; Do[c = Mod[a + b, n]; If[c == 0, AppendTo[lst, n]; Print@n]; a = b; b = c, {n, 2, 10^9}] (* Robert G. Wilson v, Dec 17 2007 *)

Extensions

a(13) from Robert G. Wilson v, Jun 23 2004
a(14) - a(16) from Robert G. Wilson v, Aug 30 2006
Extended to a(26) by Zak Seidov, Peter Pein (petsie(AT)dordos.net) and Martin Fuller, Nov 22 2007

A132678 Indices of 1's in A096535.

Original entry on oeis.org

0, 1, 3, 4, 56, 67, 670, 7740, 41842, 47345, 89440, 93196, 189277, 247372, 321327, 474346, 826237, 1988987, 2364721, 2886736, 2937246, 5426145, 12969551, 34658342, 109686031, 373121462, 681070488, 1000410504, 4064275165
Offset: 1

Views

Author

Zak Seidov, Nov 15 2007

Keywords

Examples

			No more terms <=14059654470.
Last calculated terms in A096535 are: n=14059654470, a(n-2)=12346157556, a(n-1)=1713496920, a(n)=6.
		

Crossrefs

Cf. A096274 = indices of zeros in A096535.

Programs

  • Haskell
    import Data.List (elemIndices)
    a132678 n = a132678_list !! (n-1)
    a132678_list = elemIndices 1 a096535_list
    -- Reinhard Zumkeller, Oct 19 2011

A197877 Smallest number m such that A096535(m) = n.

Original entry on oeis.org

2, 0, 5, 6, 465, 7, 16, 208, 37, 17, 11, 58, 40, 35, 84, 18, 45, 29, 395, 30, 68, 59, 41, 62, 32, 191, 325, 109, 369, 33, 89, 72, 36, 85, 42, 47, 64, 51, 101, 88, 77, 49, 125, 394, 1124, 249, 76, 50, 54, 65, 119, 74, 2193, 61, 483, 133, 80, 186, 95, 990, 468
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 19 2011

Keywords

Comments

A096535(a(n)) = n and A096535(m) <> n for m < a(n), concerning first conjecture in A096535.

Examples

			a(0) = A096274(1) = 2; a(1) = A132678(1) = 0.
		

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a197877 n = a197877_list !! n
    a197877_list = map (fromJust . (`elemIndex` a096535_list)) [0..]

A079777 a(0) = 0, a(1) = 1; for n > 1, a(n) = (a(n-1) + a(n-2)) (mod n).

Original entry on oeis.org

0, 1, 1, 2, 3, 0, 3, 3, 6, 0, 6, 6, 0, 6, 6, 12, 2, 14, 16, 11, 7, 18, 3, 21, 0, 21, 21, 15, 8, 23, 1, 24, 25, 16, 7, 23, 30, 16, 8, 24, 32, 15, 5, 20, 25, 0, 25, 25, 2, 27, 29, 5, 34, 39, 19, 3, 22, 25, 47, 13, 0, 13, 13, 26, 39, 0, 39, 39, 10, 49, 59, 37, 24, 61, 11, 72, 7, 2, 9, 11, 20
Offset: 0

Views

Author

Joseph L. Pe, Mar 08 2003

Keywords

Crossrefs

Programs

  • Mathematica
    l = {1, 1}; For[i = 3, i <= 100, i++, len = Length[l]; l = Append[l, Mod[l[[len]] + l[[len - 1]], i]]]; l
    f[s_] := f[s] = Append[s, Mod[s[[ -2]] + s[[ -1]], Length[s]]]; Nest[f, {0, 1}, 80] (* Robert G. Wilson v, Dec 16 2007 *)
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==Mod[a[n-1]+a[n-2],n]},a,{n,80}] (* Harvey P. Dale, Nov 29 2019 *)

Extensions

Edited by Robert G. Wilson v, Dec 16 2007

A122277 Length of n-th run of zeros in A122276.

Original entry on oeis.org

5, 3, 5, 4, 2, 2, 2, 1, 4, 3, 2, 1, 5, 2, 4, 2, 2, 1, 3, 1, 2, 1, 3, 2, 1, 2, 4, 1, 2, 3, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, 3, 2, 1, 2, 1, 2, 2, 3, 2, 1, 5, 2, 2, 2, 2, 1, 4, 4, 2, 1, 2, 1, 2, 1, 2, 2, 2, 3, 3, 2, 3, 1, 1, 2, 1, 2, 1, 2, 2, 3, 1, 5, 1, 2, 3, 3, 3, 2, 1, 2
Offset: 1

Views

Author

Klaus Brockhaus, Aug 29 2006

Keywords

Comments

A run of zeros in A122276 corresponds to a section of A096535 where a(j) = a(j-1) + a(j-2) holds.

Crossrefs

Cf. A096535, A122276, A122278 (records), A122279 (where records occur).

Programs

  • Mathematica
    f[s_] := f[s] = Append[s, Mod[s[[ -2]] + s[[ -1]], Length[s]]]; k = 435; t = Nest[f, {1, 1}, k]; s = {}; Do[ AppendTo[s, If[t[[n]] + t[[n + 1]] < n + 1, 0, 1]], {n, k}]; Length /@ Select[Split@s, Union@# == {0} &] (* Robert G. Wilson v Sep 02 2006 *)
  • PARI
    {m=1000;a=1;b=1;c=0;for(n=2,m,d=divrem(a+b,n);if(d[1]==0,c++,if(c>0,print1(c,",");c=0));a=b;b=d[2])}

A096534 a(1) = 0; a(2) = 1; a(n) = (a(n-1) + a(n-2)) mod n.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 1, 6, 7, 3, 10, 1, 11, 12, 8, 4, 12, 16, 9, 5, 14, 19, 10, 5, 15, 20, 8, 0, 8, 8, 16, 24, 7, 31, 3, 34, 0, 34, 34, 28, 21, 7, 28, 35, 18, 7, 25, 32, 8, 40, 48, 36, 31, 13, 44, 1, 45, 46, 32, 18, 50, 6, 56, 62, 53, 49, 35, 16, 51, 67, 47, 42, 16, 58, 74, 56, 53, 31, 5, 36
Offset: 1

Views

Author

Keywords

Crossrefs

A072987 is a closely related sequence.

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    A:= Vector(N):
    A[1]:= 0: A[2]:= 1:
    for n from 3 to N do
      A[n]:= A[n-1] + A[n-2] mod n
    od:
    convert(A,list); # Robert Israel, Nov 13 2017
  • Mathematica
    l = {0, 1}; For[i = 3, i <= 100, i++, len = Length[l]; l = Append[l, Mod[l[[len]] + l[[len - 1]], i]]]; l

A121343 a(n) = Fibonacci(n) mod n(n+1)/2.

Original entry on oeis.org

0, 0, 1, 2, 3, 5, 8, 13, 21, 34, 0, 23, 66, 51, 62, 10, 35, 67, 19, 1, 45, 89, 1, 229, 168, 275, 298, 236, 319, 59, 155, 125, 309, 376, 407, 485, 630, 628, 419, 466, 615, 370, 517, 343, 663, 830, 988, 1033, 168, 624, 700, 746, 1167, 158, 872, 1105, 609, 610, 59, 1181, 0, 1, 125
Offset: 0

Views

Author

N. J. A. Sloane, Aug 29 2006

Keywords

Examples

			a(11)=23 since Fib(11)=89==23(mod (11*12/2)).
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local r, M, p, m; r, M, p, m:=
          <<1|0>, <0|1>>, <<0|1>, <1|1>>, n, n*(n+1)/2;
          do if irem(p, 2, 'p')=1 then r:= r.M mod m fi;
             if p=0 then break fi; M:= M.M mod m
          od; r[1, 2]
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Nov 26 2016
  • Mathematica
    f[n_] := If[n == 0, 0, Mod[Fibonacci@n, n(n + 1)/2]]; f /@ Range[0, 62] (* Robert G. Wilson v, Aug 31 2006 *)
    Join[{0},Mod[First[#],Last[#]]&/@With[{nn=70},Thread[{Fibonacci[ Range[ nn]], Accumulate[Range[nn]]}]]] (* Harvey P. Dale, May 21 2012 *)
  • PARI
    fibmod(n, m)=((Mod([1, 1; 1, 0], m))^n)[1, 2]
    a(n)=lift(fibmod(n,n*(n+1)/2)) \\ Charles R Greathouse IV, Jun 20 2017

Formula

A000045(n) modulo A000217(n).

Extensions

Edited by N. J. A. Sloane, Jul 01 2008 at the suggestion of R. J. Mathar

A122278 Records in A122277.

Original entry on oeis.org

5, 7, 11, 12, 13, 19, 20, 21, 25, 27, 28, 29
Offset: 1

Views

Author

Klaus Brockhaus, Aug 30 2006

Keywords

Crossrefs

Cf. A096535, A122276, A122277, A122279 (where records occur).

Extensions

More terms from Martin Fuller, Nov 22 2007

A122279 Where records occur in A122277.

Original entry on oeis.org

1, 114, 472, 86520, 397603, 514911, 5123504, 382611481, 1166422075, 24846586495, 62401902289, 344065155571
Offset: 1

Views

Author

Klaus Brockhaus, Aug 30 2006

Keywords

Crossrefs

Cf. A096535, A122276, A122277, A122278 (records).

Extensions

More terms from Martin Fuller, Nov 22 2007
Showing 1-10 of 16 results. Next