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.

A100476 a(n) = A000720(Sum_{j=1..4} a(n-j)) with a(1)=a(2)=a(3)=a(4)=1.

This page as a plain text file.
%I A100476 #22 Apr 06 2023 02:34:39
%S A100476 1,1,1,1,2,3,4,4,6,7,8,9,10,11,12,13,14,15,16,16,18,18,19,20,21,21,22,
%T A100476 23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
%U A100476 24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24
%N A100476 a(n) = A000720(Sum_{j=1..4} a(n-j)) with a(1)=a(2)=a(3)=a(4)=1.
%C A100476 For n > 29 we have a(n) = 24. Starting with other values of a(1), a(2), a(3), a(4) what behaviors are possible? The sequence is in any case bounded. If for some k a(k) + a(k+1) + a(k+2) + a(k+3) > 400, then a(k+4) is smaller than the average of a(k), a(k+1), a(k+2) and a(k+3), which means that the sequence will always stick at a single integer after some point or go into a loop. Are there values a(1), a(2), a(3), a(4) such that the sequence would indeed exhibit cyclic behavior?
%C A100476 a(n) = 24 for 30 <= n <= 10^7. - _G. C. Greubel_, Apr 06 2023
%H A100476 G. C. Greubel, <a href="/A100476/b100476.txt">Table of n, a(n) for n = 1..10000</a>
%H A100476 <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (1).
%e A100476 a(6) = A000720(a(2)+a(3)+a(4)+a(5)) = A000720(5) = 3.
%t A100476 a={1,1,1,1}; Do[ AppendTo[a,PrimePi[a[[-1]]+a[[-2]]+a[[-3]]+a[[-4]]]], {70}]; a
%t A100476 RecurrenceTable[{a[1]==a[2]==a[3]==a[4]==1,a[n]==PrimePi[a[n-1]+ a[n-2]+ a[n-3]+a[n-4]]},a[n],{n,80}] (* _Harvey P. Dale_, Sep 19 2011 *)
%o A100476 (SageMath)
%o A100476 @CachedFunction
%o A100476 def a(n): # a = A100476
%o A100476     if (n<5): return 1
%o A100476     else: return prime_pi( sum(a(n-j) for j in range(1,5)) )
%o A100476 [a(n) for n in range(1,81)] # _G. C. Greubel_, Apr 06 2023
%Y A100476 Cf. A000720, A100478.
%K A100476 easy,nonn
%O A100476 1,5
%A A100476 _Jonathan Vos Post_, Nov 22 2004
%E A100476 Edited by _Stefan Steinerberger_, Aug 08 2007