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.

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

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 10, 3, 0, 3, 3, 6, 9, 15, 5, 0, 5, 5, 10, 15, 0, 15, 15, 2, 17, 19, 5, 24, 29, 19, 13, 32, 8, 2, 10, 12, 22, 34, 13, 3, 16, 19, 35, 6, 41, 47, 37, 32, 16, 48, 9, 1, 10, 11, 21, 32, 53, 23, 13, 36, 49, 19, 1, 20, 21, 41, 62, 31, 20, 51, 71, 46, 40, 8, 48, 56
Offset: 0

Views

Author

Keywords

Comments

Suggested by Leroy Quet.
Three conjectures: (1) All numbers appear infinitely often, i.e., for every number k >= 0 and every frequency f > 0 there is an index i such that a(i) = k is the f-th occurrence of k in the sequence.
(2) a(j) = a(j-1) + a(j-2) and a(j) = a(j-1) + a(j-2) - j occur approximately equally often, i.e., lim_{n->infinity} x_n / y_n = 1, where x_n is the number of j <= n such that a(j) = a(j-1) + a(j-2) and y_n is the number of j <= n such that a(j) = a(j-1) + a(j-2) - j (cf. A122276).
(3) There are sections a(g+1), ..., a(g+k) of arbitrary length k such that a(g+h) = a(g+h-1) + a(g+h-2) for h = 1,...,k, i.e., the sequence is nondecreasing in these sections (cf. A122277, A122278, A122279). - Klaus Brockhaus, Aug 29 2006
a(A197877(n)) = n and a(m) <> n for m < A197877(n); see first conjecture. - Reinhard Zumkeller, Oct 19 2011

Crossrefs

Cf. A079777, A096274 (location of 0's), A096534, A132678.

Programs

  • Haskell
    a096535 n = a096535_list !! n
    a096535_list = 1 : 1 : f 2 1 1 where
       f n x x' = y : f (n+1) y x where y = mod (x + x') n
    -- Reinhard Zumkeller, Oct 19 2011
  • Mathematica
    l = {1, 1}; For[i = 2, 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, {1, 1}, 80] (* Robert G. Wilson v, Aug 29 2006 *)
    RecurrenceTable[{a[0]==a[1]==1,a[n]==Mod[a[n-1]+a[n-2],n]},a,{n,90}] (* Harvey P. Dale, Apr 12 2013 *)

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

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