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.

A269427 a(1) = 1, a(n) counts m < n for which n == a(m) (mod m).

This page as a plain text file.
%I A269427 #39 Jan 01 2020 22:02:59
%S A269427 1,1,2,1,4,1,3,2,4,3,3,1,7,4,2,1,7,3,4,3,4,2,6,5,7,3,2,1,10,1,6,5,6,3,
%T A269427 3,2,8,5,6,2,5,4,6,3,6,7,6,1,10,3,3,3,9,3,5,3,7,5,8,3,7,4,6,3,5,4,7,6,
%U A269427 7,3,4,3,9,8,7,3,6,1,6,5,6
%N A269427 a(1) = 1, a(n) counts m < n for which n == a(m) (mod m).
%C A269427 I conjecture that this sequence is unbounded. Consider the first k terms of this sequence, and let L be the floor of log(k). If we count the times that each number 1,2,...,2L appears among the first k terms of this sequence, it appears that these sums form a normal distribution centered at L, so that L appears approximately k/10 times among the first k terms of this sequence. (For instance, in the first k = 10000 terms of the sequence, L = log(10000) = 9 appears 1174 times, a maximal count among any value that appears at all.) Thus the sequence appears to be unbounded.
%C A269427 The sequence is unbounded.  For any k, consider k pairwise coprime integers m_1, ..., m_k.  By the Chinese Remainder Theorem, there are infinitely many n such that n == a(m_j) (mod m_j) for each j, and thus a(n) >= k. - _Robert Israel_, Mar 21 2016
%H A269427 Peter Kagey, <a href="/A269427/b269427.txt">Table of n, a(n) for n = 1..10000</a>
%e A269427 a(1) = 1;
%e A269427 a(2) = 1 because 2 == a(1) (mod 1);
%e A269427 a(3) = 2 because 3 == a(1) (mod 1) and 3 == a(2) (mod 2);
%e A269427 a(4) = 1 because 4 == a(1) (mod 1);
%e A269427 a(5) = 4 because 5 == a(1) (mod 1), 5 == a(2) (mod 2), 5 == a(3) (mod 3), and 5 == a(4) (mod 4).
%p A269427 N:= 200: # to get a(1) to a(N)
%p A269427 A:= Vector(N,1):
%p A269427 for m from 2 to N-1 do
%p A269427   S:= [seq(A[m]+m*i,i=1..floor((N-A[m])/m))];
%p A269427   A[S]:= map(`+`,A[S],1);
%p A269427 od:
%p A269427 convert(A,list); # _Robert Israel_, Mar 21 2016
%t A269427 a[1] = 1; a[n_] := a[n] = Count[Range[n - 1], m_ /; Mod[a[m], m] == Mod[n, m]]; Table[a@ n, {n, 81}] (* _Michael De Vlieger_, Mar 21 2016 *)
%o A269427 (Java)
%o A269427 int[] terms = new int[10000];
%o A269427 terms[0] = 1;
%o A269427 for (int i = 1; i < 10000; i++) {
%o A269427     int count = 0;
%o A269427     for (int j = 0; j < i; j++) {
%o A269427         if (((i+1) - terms[j]) % (j+1) == 0) {
%o A269427             count++;
%o A269427         }
%o A269427     }
%o A269427     terms[i] = count;
%o A269427 }
%o A269427 (PARI) lista(nn) = {va = vector(nn); print1(va[1] = 1, ", "); for (n=2, nn, va[n] = sum(m=1, n-1, (Mod(va[m], m) == Mod(n, m))); print1(va[n], ", "););} \\ _Michel Marcus_, Feb 26 2016
%Y A269427 Cf. A269423.
%K A269427 easy,nonn
%O A269427 1,3
%A A269427 _Alec Jones_, Feb 25 2016