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.

Showing 1-5 of 5 results.

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.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Sep 16 2002

Keywords

Comments

In more detail, the sequence is constructed as follows: Start with a(0) = 0. The missing numbers are 1 2 3 4 5 6 ... Add the first two, and we get 3, which is therefore a(1). Cross 1, 2, and 1+2=3 off the missing list. The first two missing numbers are now 4 and 5, so a(2) = 4+5 = 9. Cross off 4,5,9 from the missing list. Repeat.
In other words, this is the sum of consecutive pairs in the sequence 1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 14, 15, ..., (A249031) the complement to the present one in the natural numbers. For example, a(1)=1+2=3, a(2)=4+5=9, a(3)=6+7=13, ... - Philippe Lallouet (philip.lallouet(AT)orange.fr), May 08 2008
The new definition is due to Philippe Lalloue (philip.lallouet(AT)orange.fr), May 08 2008, while the name "anti-Fibonacci numbers" is due to D. R. Hofstadter, Oct 23 2014.
Original definition: second members of pairs in A075325.
If instead we take the sum of the last used non-term and the most recent (i.e., 1+2, 2+4, 4+5, 5+7, etc.), we get A008585. - Jon Perry, Nov 01 2014
The sequences a = A075325, b = A047215, and c = A075326 are the solutions of the system of complementary equations defined recursively as follows:
a(n) = least new,
b(n) = least new,
c(n) = a(n) + b(n),
where "least new k" means the least positive integer not yet placed. For anti-tribonacci numbers, see A265389; for anti-tetranacci, see A299405. - Clark Kimberling, May 01 2018
We see the Fibonacci numbers 3, 13, 89 and 233 occur in this sequence of anti-Fibonacci numbers. Are there infinitely many Fibonacci numbers occurring in (a(n))? The answer is yes: at least 13% of the Fibonacci numbers occur in (a(n)). This follows from Thomas Zaslavsky's formula, which implies that the sequence A017305 = (10n+3) is a subsequence of (a(n)). The Fibonacci sequence A000045 modulo 10 equals A003893, and has period 60. In this period, the number 3 occurs 8 times. - Michel Dekking, Feb 14 2019
From Augusto Santi, Aug 16 2025: (Start)
If we apply the anti-Fibonacci algorithm to the set of natural numbers minus the multiples of 3, we get 5, 10, 20, 25, 35, 40, 50, ...; that is, all the multiples of 5 present in the restricted set used. It is quite curious that in this particular case the algorithm can be applied recursively to its own output, generating, at the generic step s, the subset of multiples of 5^s (see Mathematics StackExchange link).
Conjectures:
After the first 0, the residues (mod 5) all fall in the classes 3 and 4. More generally, for k-nacci sequences the residue classes (mod k^2+1) all fall in k consecutive ones, the first being ceiling((k^2+1)/2​).
It is known that the sequence contains the arithmetic progression 10k+3, 20k+9 and 40k+18. These three progressions cover, experimentally, the 87.5% = 7/8 of the entire sequence. The remaining terms all belong to two forms: 40k+38 and 40k+39.
The anti-Fibonacci sequence contains all the squares of the numbers of the form 10k+3 and 10k+7, and all the cubes of the numbers of the form 10k+7, for k>=0. (End)

Crossrefs

Cf. A008585, A075325, A075327, A249031, A249032 (first differences), A000045.

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)

A075423 rad(n) - 1, where rad(n) is the squarefree kernel of n (A007947).

Original entry on oeis.org

0, 1, 2, 1, 4, 5, 6, 1, 2, 9, 10, 5, 12, 13, 14, 1, 16, 5, 18, 9, 20, 21, 22, 5, 4, 25, 2, 13, 28, 29, 30, 1, 32, 33, 34, 5, 36, 37, 38, 9, 40, 41, 42, 21, 14, 45, 46, 5, 6, 9, 50, 25, 52, 5, 54, 13, 56, 57, 58, 29, 60, 61, 20, 1, 64, 65, 66, 33, 68, 69, 70, 5, 72, 73, 14, 37, 76, 77
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 15 2002

Keywords

Comments

a(n) < n for all n, see A075425.

Crossrefs

A075424(n) = a(a(n)) for n>1.

Programs

A075424 a(n) = A075423(A075423(n)).

Original entry on oeis.org

0, 1, 0, 1, 4, 5, 0, 1, 2, 9, 4, 5, 12, 13, 0, 1, 4, 5, 2, 9, 20, 21, 4, 1, 4, 1, 12, 13, 28, 29, 0, 1, 32, 33, 4, 5, 36, 37, 2, 9, 40, 41, 20, 13, 14, 45, 4, 5, 2, 9, 4, 25, 4, 5, 12, 13, 56, 57, 28, 29, 60, 9, 0, 1, 64, 65, 32, 33, 68, 69, 4, 5, 72, 13, 36, 37, 76, 77, 2, 1, 2, 81, 40, 41
Offset: 2

Views

Author

Reinhard Zumkeller, Sep 15 2002

Keywords

Comments

From Robert Israel, Apr 11 2019: (Start)
a(n) == n (mod 2).
a(n) = 0 iff n is in A000079.
a(n) = n-2 iff n-1 is in A007674. (End)

Crossrefs

Programs

A075426 Smallest initial value k that reaches 1 in n steps when iterating the map m -> rad(m)-1, where rad(m) is the squarefree kernel of m (A007947).

Original entry on oeis.org

1, 2, 3, 6, 7, 14, 15, 30, 31, 62, 95, 318, 319, 734, 959, 2798, 2879, 5758, 5759, 11518, 11519, 23038, 23039, 46078, 46079, 92158, 92159, 184318, 184319, 368638, 368639, 737278, 737279, 1548286, 1548287, 3096574, 5160959, 10321918, 10321919
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 15 2002

Keywords

Comments

Least k such that A075425(k) = n;
Observations: a(n) = n mod 2; frequently a(2k)+1 = a(2k+1) and a(2k) = 2*a(2k-1). a(n)=A075427(n-1) for n<=9.
Also A110157(a(n)) = n and A110157(m) < n for m < a(n).

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a075426 = (+ 1) . fromJust . (`elemIndex` a075425_list)
    -- Reinhard Zumkeller, Aug 14 2013
  • PARI
    rad(n)=my(f=factor(n)[, 1]); prod(i=1, #f, f[i])
    A075425(n)=if(n<4, n, 1+A075425(rad(n)-1))
    r=0;for(n=1,1e8,t=A075425(n);if(t>r,r=t;print1(n", "))) \\ Charles R Greathouse IV, Aug 08 2013
    

Extensions

a(33)-a(38) from Donovan Johnson, Aug 27 2010

A350661 a(1) = 1; a(n) = a(A007947(n) - 1) + n.

Original entry on oeis.org

1, 3, 6, 5, 10, 16, 23, 9, 12, 22, 33, 22, 35, 49, 64, 17, 34, 28, 47, 32, 53, 75, 98, 34, 30, 56, 30, 63, 92, 122, 153, 33, 66, 100, 135, 46, 83, 121, 160, 52, 93, 135, 178, 97, 94, 140, 187, 58, 65, 62, 113, 82, 135, 64, 119, 91, 148, 206, 265, 152, 213, 275, 95, 65
Offset: 1

Views

Author

Gleb Ivanov, Jan 10 2022

Keywords

Examples

			a(3) = a(2) + 3 = a(1) + 5 = 6;
a(6) = a(5) + 6 = a(4) + 11 = a(1) + 15 = 16.
		

Crossrefs

Programs

  • Mathematica
    rad[n_] := Times @@ First /@ FactorInteger[n]; a[1] = 1; a[n_] := a[n] = a[rad[n] - 1] + n; Array[a, 100] (* Amiram Eldar, Jan 10 2022 *)
  • PARI
    rad(n) = factorback(factorint(n)[, 1]); \\ A007947
    a(n) = if (n==1, 1, a(rad(n) - 1) + n); \\ Michel Marcus, Jan 10 2022
  • Python
    from sympy import prod, primefactors
    from functools import lru_cache
    rad = lambda n: prod(primefactors(n))
    @lru_cache()
    def a(n):
        if n == 1: return 1
        return a(rad(n)-1)+n
    print([a(i) for i in range(1, 100)])
    

Formula

a(1) = 1; a(n) = a(A075423(n)) + n.
Showing 1-5 of 5 results.