A075326 Anti-Fibonacci numbers: start with a(0) = 0, and extend by the rule that the next term is the sum of the two smallest numbers that are not in the sequence nor were used to form an earlier sum.
0, 3, 9, 13, 18, 23, 29, 33, 39, 43, 49, 53, 58, 63, 69, 73, 78, 83, 89, 93, 98, 103, 109, 113, 119, 123, 129, 133, 138, 143, 149, 153, 159, 163, 169, 173, 178, 183, 189, 193, 199, 203, 209, 213, 218, 223, 229, 233, 238, 243, 249, 253, 258, 263, 269, 273, 279, 283
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Wieb Bosma, Rene Bruin, Robbert Fokkink, Jonathan Grube, Anniek Reuijl, and Thian Tromp, Using Walnut to solve problems from the OEIS, arXiv:2503.04122 [math.NT], 2025. See pp. 7, 14.
- Robbert Fokkink and Gandhar Joshi, Anti-recurrence sequences, arXiv:2506.13337 [math.NT], 2025. See pp. 2, 18.
- D. R. Hofstadter, Anti-Fibonacci numbers, Oct 23 2014.
- Augusto Santi, A conjecture on Anti-k-nacci numbers, Mathematics StackExchange, 2025.
- Thomas Zaslavsky, Anti-Fibonacci Numbers: A Formula, Sep 26 2016
Crossrefs
Programs
-
Haskell
import Data.List ((\\)) a075326 n = a075326_list !! n a075326_list = 0 : f [1..] where f ws@(u:v:_) = y : f (ws \\ [u, v, y]) where y = u + v -- Reinhard Zumkeller, Oct 26 2014
-
Maple
# Maple code for M+1 terms of sequence, from N. J. A. Sloane, Oct 26 2014 c:=0; a:=[c]; t:=0; M:=100; for n from 1 to M do s:=t+1; if s in a then s:=s+1; fi; t:=s+1; if t in a then t:=t+1; fi; c:=s+t; a:=[op(a),c]; od: [seq(a[n],n=1..nops(a))];
-
Mathematica
(* Three sequences a,b,c as in Comments *) z = 200; mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]); a = {}; b = {}; c = {}; Do[AppendTo[a, mex[Flatten[{a, b, c}], If[Length[a] == 0, 1, Last[a]]]]; AppendTo[b, mex[Flatten[{a, b, c}], Last[a]]]; AppendTo[c, Last[a] + Last[b]], {z}]; Take[a, 100] (* A075425 *) Take[b, 100] (* A047215 *) Take[c, 100] (* A075326 *) Grid[{Join[{"n"}, Range[0, 20]], Join[{"a(n)"}, Take[a, 21]], Join[{"b(n)"}, Take[b, 21]], Join[{"c(n)"}, Take[c, 21]]}, Alignment -> ".", Dividers -> {{2 -> Red, -1 -> Blue}, {2 -> Red, -1 -> Blue}}] (* Peter J. C. Moses, Apr 26 2018 *) ******** (* Sequence "a" via A035263 substitutions *) Accumulate[Prepend[Flatten[Nest[Flatten[# /. {0 -> {1, 1}, 1 -> {1, 0}}] &, {0}, 7] /. Thread[{0, 1} -> {{5, 5}, {6, 4}}]], 3]] (* Peter J. C. Moses, May 01 2018 *) ******** (* Sequence "a" via Hofstadter substitutions; see his 2014 link *) morph = Rest[Nest[Flatten[#/.{1->{3},3->{1,1,3}}]&,{1},6]] hoff = Accumulate[Prepend[Flatten[morph/.Thread[{1,3}->{{6,4,5,5},{6,4,6,4,6,4,5,5}}]],3]] (* Peter J. C. Moses, May 01 2018 *)
-
Python
def aupton(nn): alst, disallowed, mink = [0], {0}, 1 for n in range(1, nn+1): nextk = mink + 1 while nextk in disallowed: nextk += 1 an = mink + nextk alst.append(an) disallowed.update([mink, nextk, an]) mink = nextk + 1 while mink in disallowed: mink += 1 return alst print(aupton(57)) # Michael S. Branicky, Jan 31 2022
-
Python
def A075326(n): return 5*n-1-int((n|(~((m:=n-1>>1)+1)&m).bit_length())&1) if n else 0 # Chai Wah Wu, Sep 11 2024
Formula
See Zaslavsky (2016) link.
Extensions
More terms from David Wasserman, Jan 16 2005
Entry revised (including the addition of an initial 0) by N. J. A. Sloane, Oct 26 2014 and Sep 26 2016 (following a suggestion from Thomas Zaslavsky)
Comments