login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A348966 Variation on the Inventory Sequence A342585: record the number of occurrences of the pair sum of all adjacent terms until 0 is recorded, then restart the count from 0. Start with a(0) = 0. See the Comments. 2
0, 0, 1, 1, 1, 0, 1, 3, 2, 0, 1, 4, 3, 0, 1, 5, 3, 1, 2, 2, 1, 1, 1, 0, 1, 7, 5, 3, 3, 2, 2, 1, 3, 0, 1, 8, 5, 5, 5, 3, 2, 1, 4, 1, 2, 0, 1, 9, 6, 7, 5, 6, 2, 1, 5, 1, 3, 1, 2, 2, 0, 1, 10, 7, 9, 8, 6, 4, 1, 5, 1, 4, 2, 2, 2, 1, 1, 1, 2, 0, 1, 11, 10, 11, 10, 8, 7, 1, 6, 1, 4, 2, 3, 2, 1, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
COMMENTS
This sequence is a variation of A342585. Here we record the number of previous occurrences of the pair sum of all adjacent terms until 0 is recorded, after which the pair sum count restarts at 0. For example the terms 0,0,1,1,1 contain one pair that sums to 0 (0,0), one pair that sums to 1 (0,1), and two pairs that sum to 2 (1,1 and 1,1). See the Examples below.
After 20 million terms the largest term is a(19997365) = 512758, which counts the occurrences of pairs that sum to 15, while there are 13766 terms between zeros. It is likely the most common sum increases to arbitrarily large values as n->infinity.
LINKS
EXAMPLE
a(1) = 0 as there have been no pairs so far in the sequence.
a(2) = 1 as there has been one pair that sums to 0: a(0) + a(1).
a(3) = 1 as there has been one pair that sums to 1: a(1) + a(2).
a(4) = 1 as there has been one pair that sums to 2: a(2) + a(3).
a(5) = 0 as there have been no pairs that sum to 3. The count now resets to 0.
a(6) = 1 as there has been one pair that sums to 0: a(0) + a(1).
a(7) = 3 as there have been three pairs that sum to 1: a(1) + a(2), a(4) + a(5), a(5) + a(6).
PROG
(Python)
from collections import Counter
def aupton(terms):
num, alst, inventory = 0, [0, 0], Counter([0])
for n in range(2, terms+1):
c = inventory[num]
num = 0 if c == 0 else num + 1
alst.append(c)
inventory.update([alst[-2] + alst[-1]])
return alst
print(aupton(97)) # Michael S. Branicky, Nov 05 2021
CROSSREFS
Cf. A342585, A348967 (pair differences), A000045.
Sequence in context: A286223 A341163 A329278 * A008783 A139144 A360866
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Nov 05 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 19:33 EDT 2024. Contains 372354 sequences. (Running on oeis4.)