OFFSET
1,2
COMMENTS
From Daniel Joyce, Apr 13 2001: (Start)
This sequence displays every positive integer exactly twice and the gap between the two occurrences of n contains exactly n other values. The first occurrence of n precedes the first occurrence of n+1.
Also related to the Wythoff array (A035513) and the Para-Fibonacci sequence (A035513) where every positive integer is displayed exactly once in the whole array. Take any integer n in A026272 and let C = number of terms from the beginning of the sequence to the second occurrence of n. Then C = (2nd term after n in the applicable sequence for n in A035513).
Also in the second occurrence of n in A026272, let N=n ( - one term) = (first term value after n in the applicable sequence for n in A035513). In this format the second occurrence of n in A026272 will produce in A035513, n itself and two of the succeeding terms of n in the Wythoff array where every positive integer can only be displayed once.
In A026272 if |a(n)-a(n+1)| > 10 then phi ~ a(n)/|a(n)-a(n+1)|. When n -> infinity it will converge to phi. (End)
Or, put a copy of n in A000027 n places further along! - Zak Seidov, May 24 2008
Another version would prefix this sequence with two leading 0's (see the Angelini reference). If we use this form and write down the indices of the two 0's, the two 1's, the two 2's, the two 3's, etc., then we get A072061. - Jacques ALARDET, Jul 26 2008
REFERENCES
Eric Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.
LINKS
Zak Seidov, Table of n, a(n) for n = 1..1000
Jeffrey Shallit, The Hurt-Sada Array and Zeckendorf Representations, arXiv:2501.08823 [math.NT], 2025. See p. 10.
MATHEMATICA
s=Range[1000]; n=0; Do[n++; s=Insert[s, n, Position[s, n][[1]]+n+1], {500}]; A026272=Take[s, 1000] (* Zak Seidov, May 24 2008 *)
PROG
(PARI) A026272=apply(t->t-1, A026242[3..-1]) \\ Use vecextract(A026242, "3..") in PARI versions < 2.7. - M. F. Hasler, Sep 17 2014
(Python)
from collections import Counter
from itertools import count, islice
def agen(): # generator of terms
aset, alst, k, mink, counts = set(), [0], 0, 1, Counter()
for n in count(1):
for k in range(1, len(alst)-1):
if k == alst[n-k-1] and counts[alst[n-k-1]] == 1: an = k; break
else: an = mink
yield an; aset.add(an); alst.append(an); counts.update([an])
while mink in aset: mink += 1
print(list(islice(agen(), 66))) # Michael S. Branicky, Jun 27 2022
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
Edited by Max Alekseyev, May 31 2011
STATUS
approved