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-10 of 19 results. Next

A168560 Incorrect duplicate of A019446.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 5, 5, 6, 10, 7, 8, 9, 9, 10, 10, 11, 12, 12, 13, 13
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A019446.

A005206 Hofstadter G-sequence: a(0) = 0; a(n) = n - a(a(n-1)) for n > 0.

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 9, 10, 11, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 22, 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 30, 31, 32, 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 43, 44, 45, 45, 46, 46, 47
Offset: 0

Views

Author

Keywords

Comments

Rule for finding n-th term: a(n) = An, where An denotes the Fibonacci antecedent to (or right shift of) n, which is found by replacing each F(i) in the Zeckendorf expansion (obtained by repeatedly subtracting the largest Fibonacci number you can until nothing remains) by F(i-1) (A1=1). For example: 58 = 55 + 3, so a(58) = 34 + 2 = 36. - Diego Torres (torresvillarroel(AT)hotmail.com), Nov 24 2002
From Albert Neumueller (albert.neu(AT)gmail.com), Sep 28 2006: (Start)
A recursively built tree structure can be obtained from the sequence (see Hofstadter, p. 137):
14 15 16 17 18 19 20 21
\ / / \ / \ / /
9 10 11 12 13
\ / / \ /
6 7 8
\ / /
\ / /
\ / /
4 5
\ /
\ /
\ /
\ /
\ /
3
/
2
\ /
1
To construct the tree: node n is connected with the node a(n) below
n
/
a(n)
For example, since a(7) = 4:
7
/
4
If the nodes of the tree are read from bottom to top, left to right, one obtains the positive integers: 1, 2, 3, 4, 5, 6, ... The tree has a recursive structure, since the construct
/
x
\ /
x
can be repeatedly added on top of its own ends, to construct the tree from its root: e.g.,
/
x
/ \ /
x x
\ / /
x x
\ /
\ /
x
When moving from a node to a lower connected node, one is moving to the parent. Parent node of n: floor((n+1)/tau). Left child of n: floor(tau*n). Right child of n: floor(tau*(n+1))-1 where tau=(1+sqrt(5))/2. (See the Sillke link.)
(End)
The number n appears A001468(n) times; A001468(n) = floor((n+1)*Phi) - floor(n*Phi) with Phi = (1 + sqrt 5)/2. - Philippe Deléham, Sep 22 2005
Number of positive Wythoff A-numbers A000201 not exceeding n. - N. J. A. Sloane, Oct 09 2006
Number of positive Wythoff B-numbers < A000201(n+1). - N. J. A. Sloane, Oct 09 2006
From Bernard Schott, Apr 23 2022: (Start)
Properties coming from the 1st problem proposed during the 45th Czech and Slovak Mathematical Olympiad in 1996 (see IMO Compendium link):
-> a(n) >= a(n-1) for any positive integer n,
-> a(n) - a(n-1) belongs to {0,1},
-> No integer n exists such that a(n-1) = a(n) = a(n+1). (End)
For n >= 1, find n in the Wythoff array (A035513). a(n) is the number that precedes n in its row, using the preceding column of the extended Wythoff array (A287870) if n is at the start of the (unextended) row. - Peter Munn, Sep 17 2022
See my 2023 publication on Hofstadter's G-sequence for a proof of the equality of (a(n)) with the sequence A073869. - Michel Dekking, Apr 28 2024
From Michel Dekking, Dec 16 2024: (Start)
Focus on the pairs of duplicate values, i.e., the pairs (a(n-1),a(n)) with a(n-1) = a(n). Directly from Theorem 1 in Kimberling and Stolarsky (2016) one derives that the m-th pair of duplicate values (a(n-1),a(n)) occurs at n = U(m), where U = 2,5,7,10,... is the upper Wythoff sequence. For example, (3,3) is the second pair, and occurs at U(2) = 5.
This property can be used to give a simple construction for (a(n)) -- ignoring the superfluous a(0) = 0.
Let 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,... be the sequence of positive natural numbers. Double all the elements of the lower Wythoff sequence (L(n)) = 1,3,4,6,8,9,11,....:
(x(n)) := 1,1, 2, 3,3, 4,4, 5, 6,6, 7, 8,8, 9,9, 10,....
Claim: the result is (a(n)). This follows since because of the doubling, the m-th pair of duplicate values (a(n-1),a(n)) occurs in x at n = L(m) + m = U(m). The second equality by a well-known formula.
It follows from this by Theorem 1 of K&S, that a(n-1) = x(n-1), and a(n) = x(n) if n = U(m), for all m. But since L and U are complementary sequences, a(n) = x(n) will also hold if n = L(k), for all k. For example, L(4) = 6, and a(6) = x(6) = 4.
Corollary: for n >= 2 replace every pair of duplicate values (a(n-1),a(n)) by 0, and all the remaining elements of (a(n)) by 1. Then the result is the Fibonacci word 0,1,0,0,1,0,1,0,0... This is implied by the fact that L gives the positions of the 0s, and U the position of the 1's in the Fibonacci word. (End)
For all n >= 0, a(n) <= A005374(n), as proved in Letouzey-Li-Steiner link. Last equality occurs at n = 12, while a(n) < A005374(n) afterwards. - Pierre Letouzey, Feb 20 2025

References

  • D. R. Hofstadter, Goedel, Escher, Bach: an Eternal Golden Braid, Random House, 1980, p. 137.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Apart from initial terms, same as A060143. Cf. A123070.
a(n):=Sum{k=1..n} h(k), n >= 1, with h(k):= A005614(k-1) and a(0):=0.

Programs

  • Haskell
    a005206 n = a005206_list !! n
    a005206_list = 0 : zipWith (-) [1..] (map a005206 a005206_list)
    -- Reinhard Zumkeller, Feb 02 2012, Aug 07 2011
    
  • Haskell
    a005206 = sum . zipWith (*) a000045_list . a213676_row . a000201 . (+ 1)
    -- Reinhard Zumkeller, Mar 10 2013
    
  • Magma
    [Floor((n+1)*(1+Sqrt(5))/2)-n-1: n in [0..80]]; // Vincenzo Librandi, Nov 19 2016
    
  • Maple
    H:=proc(n) option remember; if n=0 then 0 elif n=1 then 1 else n-H(H(n-1)); fi; end proc: seq(H(n),n=0..76);
  • Mathematica
    a[0] = 0; a[n_] := a[n] = n - a[a[n - 1]]; Array[a, 77, 0]
    (* Second program: *)
    Fold[Append[#1, #2 - #1[[#1[[#2]] + 1 ]] ] &, {0}, Range@ 76] (* Michael De Vlieger, Nov 13 2017 *)
  • PARI
    first(n)=my(v=vector(n)); v[1]=1; for(k=2,n, v[k]=k-v[v[k-1]]); concat(0,v) \\ Charles R Greathouse IV, Sep 02 2015
    
  • Python
    from math import isqrt
    def A005206(n): return (n+1+isqrt(5*(n+1)**2)>>1)-n-1 # Chai Wah Wu, Aug 09 2022

Formula

a(n) = floor((n+1)*tau) - n - 1 = A000201(n+1)-n-1, where tau = (1+sqrt(5))/2; or a(n) = floor(sigma*(n+1)) where sigma = (sqrt(5)-1)/2.
a(0)=0, a(1)=1, a(n) = n - a(floor(n/tau)). - Benoit Cloitre, Nov 27 2002
a(n) = A019446(n) - 1. - Reinhard Zumkeller, Feb 02 2012
a(n) = n - A060144(n+1). - Reinhard Zumkeller, Apr 07 2012
a(n) = Sum_{k=1..A072649(m)} A000045(m)*A213676(m,k): m=A000201(n+1). - Reinhard Zumkeller, Mar 10 2013
From Pierre Letouzey, Sep 09 2015: (Start)
a(n + a(n)) = n.
a(n) + a(a(n+1) - 1) = n.
a(0) = 0, a(n+1) = a(n) + d(n) and d(0) = 1, d(n+1)=1-d(n)*d(a(n)). (End)
a(n) = A293688(n)/(n+1) for n >= 0 (conjectured). - Enrique Navarrete, Oct 15 2017
A generalization of Diego Torres's 2002 comment as a formula: if n = Sum_{i in S} A000045(i+1), where S is a set of positive integers, then a(n) = Sum_{i in S} A000045(i). - Peter Munn, Sep 28 2022
Conjectures from Chunqing Liu, Aug 01 2023: (Start)
a(A000201(n)-1) = n-1.
a(A001950(n)-1) = a(A001950(n)) = A000201(n). (End)

Extensions

a(0) = 0 added in the Name by Bernard Schott, Apr 23 2022

A194959 Fractalization of (1 + floor(n/2)).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 3, 4, 2, 1, 3, 5, 4, 2, 1, 3, 5, 6, 4, 2, 1, 3, 5, 7, 6, 4, 2, 1, 3, 5, 7, 8, 6, 4, 2, 1, 3, 5, 7, 9, 8, 6, 4, 2, 1, 3, 5, 7, 9, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 12, 10, 8, 6, 4, 2, 1, 3, 5
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2011

Keywords

Comments

Suppose that p(1), p(2), p(3), ... is an integer sequence satisfying 1 <= p(n) <= n for n >= 1. Define g(1)=(1) and for n > 1, form g(n) from g(n-1) by inserting n so that its position in the resulting n-tuple is p(n). The sequence f obtained by concatenating g(1), g(2), g(3), ... is clearly a fractal sequence, here introduced as the fractalization of p. The interspersion associated with f is here introduced as the interspersion fractally induced by p, denoted by I(p); thus, the k-th term in the n-th row of I(p) is the position of the k-th n in f. Regarded as a sequence, I(p) is a permutation of the positive integers; its inverse permutation is denoted by Q(p).
...
Example: Let p=(1,2,2,3,3,4,4,5,5,6,6,7,7,...)=A008619. Then g(1)=(1), g(2)=(1,2), g(3)=(1,3,2), so that
f=(1,1,2,1,3,2,1,3,4,2,1,3,5,4,2,1,3,5,6,4,2,1,...)=A194959; and I(p)=A057027, Q(p)=A064578.
The interspersion I(P) has the following northwest corner, easily read from f:
1 2 4 7 11 16 22
3 6 10 15 21 28 36
5 8 12 17 23 30 38
9 14 20 27 35 44 54
...
Following is a chart of selected p, f, I(p), and Q(p):
p f I(p) Q(p)
Count odd numbers up to n, then even numbers down from n. - Franklin T. Adams-Watters, Jan 21 2012
This sequence defines the square array A(n,k), n > 0 and k > 0, read by antidiagonals and the triangle T(n,k) = A(n+1-k,k) for 1 <= k <= n read by rows (see Formula and Example). - Werner Schulte, May 27 2018

Examples

			The sequence p=A008619 begins with 1,2,2,3,3,4,4,5,5,..., so that g(1)=(1). To form g(2), write g(1) and append 2 so that in g(2) this 2 has position p(2)=2: g(2)=(1,2). Then form g(3) by inserting 3 at position p(3)=2: g(3)=(1,3,2), and so on. The fractal sequence A194959 is formed as the concatenation g(1)g(2)g(3)g(4)g(5)...=(1,1,2,1,3,2,1,3,4,2,1,3,5,4,2,...).
From _Werner Schulte_, May 27 2018: (Start)
This sequence seen as a square array read by antidiagonals:
  n\k: 1  2  3  4  5   6   7   8   9  10  11  12 ...
  ===================================================
   1   1  2  2  2  2   2   2   2   2   2   2   2 ... (see A040000)
   2   1  3  4  4  4   4   4   4   4   4   4   4 ... (see A113311)
   3   1  3  5  6  6   6   6   6   6   6   6   6 ...
   4   1  3  5  7  8   8   8   8   8   8   8   8 ...
   5   1  3  5  7  9  10  10  10  10  10  10  10 ...
   6   1  3  5  7  9  11  12  12  12  12  12  12 ...
   7   1  3  5  7  9  11  13  14  14  14  14  14 ...
   8   1  3  5  7  9  11  13  15  16  16  16  16 ...
   9   1  3  5  7  9  11  13  15  17  18  18  18 ...
  10   1  3  5  7  9  11  13  15  17  19  20  20 ...
  etc.
This sequence seen as a triangle read by rows:
  n\k:  1  2  3  4  5   6   7   8   9  10  11  12  ...
  ======================================================
   1    1
   2    1  2
   3    1  3  2
   4    1  3  4  2
   5    1  3  5  4  2
   6    1  3  5  6  4   2
   7    1  3  5  7  6   4   2
   8    1  3  5  7  8   6   4   2
   9    1  3  5  7  9   8   6   4   2
  10    1  3  5  7  9  10   8   6   4   2
  11    1  3  5  7  9  11  10   8   6   4   2
  12    1  3  5  7  9  11  12  10   8   6   4   2
  etc.
(End)
		

References

  • Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Cf. A000142, A000217, A005408, A005843, A008619, A057027, A064578, A209229, A210535, A219977; A000012 (col 1), A157532 (col 2), A040000 (row 1), A113311 (row 2); A194029 (introduces the natural fractal sequence and natural interspersion of a sequence - different from those introduced at A194959).
Cf. A003558 (g permutation order), A102417 (index), A330081 (on bits), A057058 (inverse).

Programs

  • Mathematica
    r = 2; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A008619 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A194959 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]]  (* A057027 *)
    q[n_] := Position[w, n]; Flatten[
    Table[q[n], {n, 1, 80}]]  (* A064578 *)
    Flatten[FoldList[Insert[#1, #2, Floor[#2/2] + 1] &, {}, Range[10]]] (* Birkas Gyorgy, Jun 30 2012 *)
  • PARI
    T(n,k) = min(k<<1-1,(n-k+1)<<1); \\ Kevin Ryde, Oct 09 2020

Formula

From Werner Schulte, May 27 2018 and Jul 10 2018: (Start)
Seen as a triangle: It seems that the triangle T(n,k) for 1 <= k <= n (see Example) is the mirror image of A210535.
Seen as a square array A(n,k) and as a triangle T(n,k):
A(n,k) = 2*k-1 for 1 <= k <= n, and A(n,k) = 2*n for 1 <= n < k.
A(n+1,k+1) = A(n,k+1) + A(n,k) - A(n-1,k) for k > 0 and n > 1.
A(n,k) = A(k,n) - 1 for n > k >= 1.
P(n,x) = Sum_{k>0} A(n,k)*x^(k-1) = (1-x^n)*(1-x^2)/(1-x)^3 for n >= 1.
Q(y,k) = Sum_{n>0} A(n,k)*y^(n-1) = 1/(1-y) for k = 1 and Q(y,k) = Q(y,1) + P(k-1,y) for k > 1.
G.f.: Sum_{n>0, k>0} A(n,k)*x^(k-1)*y^(n-1) = (1+x)/((1-x)*(1-y)*(1-x*y)).
Sum_{k=1..n} A(n+1-k,k) = Sum_{k=1..n} T(n,k) = A000217(n) for n > 0.
Sum_{k=1..n} (-1)^(k-1) * A(n+1-k,k) = Sum_{k=1..n} (-1)^(k-1) * T(n,k) = A219977(n-1) for n > 0.
Product_{k=1..n} A(n+1-k,k) = Product_{k=1..n} T(n,k) = A000142(n) for n > 0.
A(n+m,n) = A005408(n-1) for n > 0 and some fixed m >= 0.
A(n,n+m) = A005843(n) for n > 0 and some fixed m > 0.
Let A_m be the upper left part of the square array A(n,k) with m rows and m columns. Then det(A_m) = 1 for some fixed m > 0.
The P(n,x) satisfy the recurrence equation P(n+1,x) = P(n,x) + x^n*P(1,x) for n > 0 and initial value P(1,x) = (1+x)/(1-x).
Let B(n,k) be multiplicative with B(n,p^e) = A(n,e+1) for e >= 0 and some fixed n > 0. That yields the Dirichlet g.f.: Sum_{k>0} B(n,k)/k^s = (zeta(s))^3/(zeta(2*s)*zeta(n*s)).
Sum_{k=1..n} A(k,n+1-k)*A209229(k) = 2*n-1. (conjectured)
(End)
From Kevin Ryde, Oct 09 2020: (Start)
T(n,k) = 2*k-1 if 2*k-1 <= n, or 2*(n+1-k) if 2*k-1 > n. [Lévy, chapter 1 section 1 equations (a),(b)]
Fixed points T(n,k)=k for k=1 and k = (2/3)*(n+1) when an integer. [Lévy, chapter 1 section 2 equation (3)]
(End)

Extensions

Name corrected by Franklin T. Adams-Watters, Jan 21 2012

A001468 There are a(n) 2's between successive 1's.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2
Offset: 0

Views

Author

Keywords

Comments

The Fibonacci word on the alphabet {2,1}, with an extra 1 in front. - Michel Dekking, Nov 26 2018
Start with 1, apply 1->12, 2->122, take limit. - Philippe Deléham, Sep 23 2005
Also number of occurrences of n in Hofstadter G-sequence (A005206) and in A019446. - Reinhard Zumkeller, Feb 02 2012, Aug 07 2011
A block-fractal sequence: every block occurs infinitely many times. Also a reverse block-fractal sequence. See A280511. - Clark Kimberling, Jan 06 2017

References

  • D. Gault and M. Clint, "Curiouser and curiouser" said Alice. Further reflections on an interesting recursive function, Internat. J. Computer Math., 26 (1988), 35-43. See Table 2.
  • D. R. Hofstadter, personal communication, Jul 15 1977.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Same as A014675 if initial 1 is deleted. Cf. A003849, A000201, A280511.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021

Programs

  • Haskell
    import Data.List (group)
    a001468 n = a001468_list !! n
    a001468_list = map length $ group a005206_list
    -- Reinhard Zumkeller, Aug 07 2011
    
  • Maple
    Digits := 100: t := evalf( (1+sqrt(5))/2); A001468 := n-> floor((n+1)*t)-floor(n*t);
  • Mathematica
    Table[Floor[GoldenRatio*(n + 1)] - Floor[GoldenRatio*n], {n, 0, 80}] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 14 2006 *)
    Nest[ Flatten[# /. {1 -> {1, 2}, 2 -> {1, 2, 2}}] &, {1}, 6] (* Robert G. Wilson v, May 20 2014 and corrected Apr 24 2017 following Clark Kimberling's email of Mar 22 2017 *)
    SubstitutionSystem[{1->{1,2},2->{1,2,2}},{1},{6}][[1]] (* Harvey P. Dale, Jan 31 2022 *)
  • PARI
    a=[1];for(i=1,30,a=concat([a,vector(a[i],j,2),1]));a \\ Or compute as A001468(n)=A201(n+1)-A201(n) with A201(n)=(n+sqrtint(5*n^2))\2, working for n>=0 although A000201 is defined for n>=1. - M. F. Hasler, Oct 13 2017
    
  • Python
    def A001468(length):
        a = [1]
        for i in range(length):
            for _ in range(a[i]):
                a.append(2)
            a.append(1)
            if len(a)>=length:
                break
        return a[:length] # Nicholas Stefan Georgescu, Jun 02 2022
    
  • Python
    from math import isqrt
    def A001468(n): return (n+1+isqrt(m:=5*(n+1)**2)>>1)-(n+isqrt(m-10*n-5)>>1) # Chai Wah Wu, Aug 25 2022

Formula

a(n) = [(n+1) tau] - [n tau], tau = (1 + sqrt 5)/2 = A001622, [] = floor function.
a(n) = A000201(n+1) - A000201(n) = A022342(n+1) - A022342(n), n >= 1; i.e., the first term discarded, this yields the first differences of A000201 and A022342. - M. F. Hasler, Oct 13 2017

Extensions

Rechecked by N. J. A. Sloane, Nov 07 2001

A019444 a_1, a_2, ..., is a permutation of the positive integers such that the average of each initial segment is an integer, using the greedy algorithm to define a_n.

Original entry on oeis.org

1, 3, 2, 6, 8, 4, 11, 5, 14, 16, 7, 19, 21, 9, 24, 10, 27, 29, 12, 32, 13, 35, 37, 15, 40, 42, 17, 45, 18, 48, 50, 20, 53, 55, 22, 58, 23, 61, 63, 25, 66, 26, 69, 71, 28, 74, 76, 30, 79, 31, 82, 84, 33, 87, 34, 90, 92, 36, 95, 97, 38, 100, 39, 103, 105, 41, 108, 110, 43, 113
Offset: 1

Views

Author

R. K. Guy and Tom Halverson (halverson(AT)macalester.edu)

Keywords

Comments

Self-inverse when considered as a permutation or function, i.e., a(a(n)) = n. - Howard A. Landman, Sep 25 2001
That each initial segment has an integer average is trivially equivalent to the sum of the first n elements always being divisible by n. - Franklin T. Adams-Watters, Jul 07 2014
Also, a lexicographically minimal sequence of distinct positive integers such that all values of a(n)-n are also distinct. - Ivan Neretin, Apr 18 2015
Comments from N. J. A. Sloane, Mar 29 2025 (Start):
Let d(n) = number of 1 <= i <= n such that a(i) < i. The d(i) sequence begins 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, ..., and appears to be A060144 without its initial term.
Let r(n) = 1 if a(n) < a(n+1), otherwise 0, and let f(n) = 1 if a(n) > a(n+1), otherwise 0. Then R = partial sums of r(n) and F = partial sums of f(n) count the rises and falls, respectively, in the present sequence. It appears that R and F are essentially A060143 and A060144 (again).
If a(n) is the k-th term in a monotonically strictly increasing rum of terms, set R(n) = k. It appears that the sequence R(n), n>=1, is essentially A270788.
For other sequences derived from the present one, see A382162, A382168, and A382169.
(End)

References

  • Muharem Avdispahić and Faruk Zejnulahi, An integer sequence with a divisibility property, Fibonacci Quarterly, Vol. 58:4 (2020), 321-333.

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_] := a[n]=Module[{s, v}, s=a/@Range[n-1]; For[v=Mod[ -Plus@@s, n], v<1||MemberQ[s, v], v+=n, Null]; v]
    lst = {1}; f[s_List] := Block[{k = 1, len = 1 + Length@ lst, t = Plus @@ lst}, While[ MemberQ[s, k] || Mod[k + t, len] != 0, k++ ]; AppendTo[lst, k]]; Nest[f, lst, 69] (* Robert G. Wilson v, May 17 2010 *)
    Fold[Append[#1, #2 Ceiling[#2/GoldenRatio] - Total[#1]] &, {1}, Range[2, 70]] (* Birkas Gyorgy, May 25 2012 *)
  • PARI
    al(n)=local(v,s,fnd);v=vector(n);v[1]=s=1;for(k=2,n,fnd=0;for(i=1,k-1,if(v[i]==s,fnd=1;break));v[k]=if(fnd,s+k,s);s+=fnd);v \\ Franklin T. Adams-Watters, May 20 2010
    
  • PARI
    A019444_upto(N, c=0, A=Vec(1, N))={for(n=2, N, A[n]||(#AM. F. Hasler, Nov 27 2019

Formula

a(n) = A002251(n-1) + 1. (Corrected by M. F. Hasler, Sep 17 2014)
Let s(n) = (1/n)*Sum_{k=1..n} a(k) = A019446(n). Then if s(n-1) does not occur in a(1),...,a(n-1), a(n) = s(n) = s(n-1); otherwise, a(n) = s(n-1) + n and s(n) = s(n-1) + 1. - Franklin T. Adams-Watters, May 20 2010
Lim_{n->infinity} max(n,a(n))/min(n,a(n)) = phi = A001622. - Stanislav Sykora, Jun 12 2017

A054065 Fractal sequence induced by tau: for k >= 1, let p(k) be the permutation of 1,2,...,k obtained by ordering the fractional parts {h*tau} for h=1,2,...,k; then juxtapose p(1),p(2),p(3),...

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 2, 4, 1, 3, 5, 2, 4, 1, 3, 5, 2, 4, 1, 6, 3, 5, 2, 7, 4, 1, 6, 3, 5, 2, 7, 4, 1, 6, 3, 8, 5, 2, 7, 4, 9, 1, 6, 3, 8, 5, 10, 2, 7, 4, 9, 1, 6, 3, 8, 5, 10, 2, 7, 4, 9, 1, 6, 11, 3, 8, 5, 10, 2, 7, 12, 4, 9, 1, 6, 11, 3, 8, 13, 5, 10, 2, 7, 12, 4, 9, 1, 6, 11, 3, 8, 13, 5, 10, 2, 7, 12, 4, 9
Offset: 1

Views

Author

Keywords

Examples

			p(1)=(1); p(2)=(2,1); p(3)=(2,1,3); p(4)=(2,4,1,3).
As a triangular array (see A194832), first nine rows:
1
2 1
2 1 3
2 4 1 3
5 2 4 1 3
5 2 4 1 6 3
5 2 7 4 1 6 3
5 2 7 4 1 6 3 8
5 2 7 4 9 1 6 3 8
		

Crossrefs

Position of 1 in p(k) is given by A019446. Position of k in p(k) is given by A019587. For related arrays and sequences, see A194832.

Programs

  • Mathematica
    r = (1 + Sqrt[5])/2;
    t[n_] := Table[FractionalPart[k*r], {k, 1, n}];
    f = Flatten[Table[Flatten[(Position[t[n], #1] &) /@ Sort[t[n], Less]], {n, 1, 20}]] (* A054065 *)
    TableForm[Table[Flatten[(Position[t[n], #1] &) /@ Sort[t[n], Less]], {n, 1, 15}]]
    row[n_] := Position[f, n];
    u = TableForm[Table[row[n], {n, 1, 20}]]
    g[n_, k_] := Part[row[n], k];
    p = Flatten[Table[g[k, n - k + 1], {n, 1, 13}, {k, 1, n}]] (* A054069 *)
    q[n_] := Position[p, n]; Flatten[Table[q[n], {n, 1, 80}]]  (* A054068 *)
    (* Clark Kimberling, Sep 03 2011 *)
    Flatten[Table[Ordering[Table[FractionalPart[GoldenRatio k], {k, n}]], {n, 10}]] (* Birkas Gyorgy, Jun 30 2012 *)

Extensions

Extended by Ray Chandler, Apr 18 2009

A255977 The number of numbers j+k*r <= n, where r = golden ratio and j and k are nonnegative integers.

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 17, 22, 27, 33, 40, 47, 55, 64, 73, 83, 93, 104, 116, 128, 141, 154, 168, 183, 198, 214, 231, 248, 266, 284, 303, 323, 343, 364, 386, 408, 431, 454, 478, 503, 528, 554, 580, 607, 635, 663, 692, 722, 752, 783, 814, 846, 879, 912, 946, 980
Offset: 1

Views

Author

Clark Kimberling, Mar 14 2015

Keywords

Comments

The difference sequence is A019446.
From Thomas Anton, Oct 22 2018: (Start)
It appears that this sequence (apart from the first term) can be obtained through the following sieving process. Start with the positive integers. Then, at each stage, circle the first remaining number that has not already been circled, and delete all terms in the subsequence of terms that were not circled in previous stages with circled indices that have not yet been deleted. E.g., the first few iterations are
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
We circle 1, and take the subsequence of previously uncircled numbers, which is the entire sequence, and delete all terms with circled indices that have not been deleted, in this case, just the 1st, 1.
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
We circle 2, and take the previously uncircled subsequence, which is again the entire sequence, and delete all terms with circled indices that have not been deleted, just the 2nd, 3.
(2), 4, 5, 6, 7, 8, 9, 10, 11, 12, ...
We circle 4, and take the previously uncircled subsequence, which is all terms of the sequence except 2, and delete all terms in that subsequence with circled indices (as terms of the subsequence) that have not been deleted, the 2nd and 4th, respectively the 3rd and 5th terms of the entire sequence, 5 and 7.
(2), (4), 6, 8, 9, 10, 11, 12, 13, 14, ...
etc.
(End)

Crossrefs

Programs

  • Maple
    t:=(1+sqrt(5))/2: a:=n->n+1+add(floor((n-k)/t),k=0..n): seq(a(n),n=0..55); # Muniru A Asiru, Oct 24 2018
  • Mathematica
    Table[n + 1 + Sum[Floor[(n - k)/GoldenRatio], {k, 0, n}], {n, 0, 200}]

Formula

a(n) = n + 1 + Sum{floor[(n - k)/tau], k = 0..n}, where tau = (1 + sqrt(5))/2.
a(n) = A054347(n-1) - (n^2 - 3*n)/2. - Alan Michael Gómez Calderón, Nov 21 2024

A356327 Replace 2^k in binary expansion of n with A039834(1+k).

Original entry on oeis.org

0, 1, -1, 0, 2, 3, 1, 2, -3, -2, -4, -3, -1, 0, -2, -1, 5, 6, 4, 5, 7, 8, 6, 7, 2, 3, 1, 2, 4, 5, 3, 4, -8, -7, -9, -8, -6, -5, -7, -6, -11, -10, -12, -11, -9, -8, -10, -9, -3, -2, -4, -3, -1, 0, -2, -1, -6, -5, -7, -6, -4, -3, -5, -4, 13, 14, 12, 13, 15, 16
Offset: 0

Views

Author

Rémy Sigrist, Aug 03 2022

Keywords

Comments

This sequence has similarities with A022290, and is related to negaFibonacci representations.

Examples

			For n = 13:
- 13 = 2^3 + 2^2 + 2^0,
- so a(13) = A039834(4) + A039834(3) + A039834(1) = -3 + 2 + 1 = 0.
		

Crossrefs

Programs

  • Mathematica
    Table[Reverse[#].Fibonacci[-Range[Length[#]]] &@ IntegerDigits[n, 2], {n, 0, 69}] (* Rémy Sigrist, Aug 05 2022 *)
  • PARI
    a(n) = { my (v=0, k); while (n, n-=2^k=valuation(n, 2); v+=fibonacci(-1-k)); return (v) }
    
  • Python
    from sympy import fibonacci
    def A356327(n): return sum(fibonacci(-a)*int(b) for a, b in enumerate(bin(n)[:1:-1],start=1)) # Chai Wah Wu, Aug 31 2022

Formula

a(n) = Sum_{k>=0} A030308(n,k)*A039834(1+k).
a(A215024(n)) = n.
a(A215025(n)) = -n.
a(A003714(n)) = A309076(n).
Empirically:
- a(n) = 0 iff n = 0 or n belongs to A072197,
- a(n) = 1 iff n belongs to A020989,
- a(2*A215024(n)) = -A000201(n) for n > 0,
- a(3*A215024(n)) = -A060143(n),
- a(floor(A215024(n)/2)) = -A060143(n),
- a(4*A215024(n)) = A001950(n) for n > 0,
- a(floor(A215024(n)/4)) = A189663(n) for n > 0,
- a(2*A215025(n)) = A026351(n),
- a(3*A215025(n)) = A019446(n) for n > 0,
- a(floor(A215025(n)/2)) = A019446(n) for n > 0,
- a(4*A215025(n)) = -A004957(n),
- a(floor(A215025(n)/4)) = -A060144(n+1) for n >= 0.

A194969 Interspersion fractally induced by A194968, a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 10, 8, 9, 11, 15, 12, 13, 14, 16, 21, 17, 18, 20, 19, 22, 28, 23, 24, 27, 25, 26, 29, 36, 30, 31, 35, 32, 34, 33, 37, 45, 38, 39, 44, 40, 43, 41, 42, 46, 55, 47, 48, 54, 49, 53, 50, 51, 52, 56, 66, 57, 58, 65, 59, 64, 60, 61, 63, 62, 67, 78, 68
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence. Every pair of rows eventually intersperse. As a sequence, A194969 is a permutation of the positive integers, with inverse A194970.

Examples

			Northwest corner:
1...2...4...7...11..16
3...6...10..15..21..28
5...8...12..17..23..30
9...13..18..24..31..39
14..20..27..35..44..54
		

Crossrefs

Cf. A194958, A019446, A194968, A194970 (inverse).

Programs

  • Mathematica
    r = GoldenRatio; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A019446 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20]  (* A194968 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]]  (* A194969 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n],
    {n, 1, 80}]]  (* A194970 *)

A019445 Form a permutation of the positive integers, p_1, p_2, ..., such that the average of each initial segment is an integer, using the greedy algorithm to define p_n; sequence gives p_1 + ... + p_n.

Original entry on oeis.org

1, 4, 6, 12, 20, 24, 35, 40, 54, 70, 77, 96, 117, 126, 150, 160, 187, 216, 228, 260, 273, 308, 345, 360, 400, 442, 459, 504, 522, 570, 620, 640, 693, 748, 770, 828, 851, 912, 975, 1000, 1066, 1092, 1161, 1232, 1260, 1334, 1410, 1440, 1519, 1550
Offset: 1

Views

Author

R. K. Guy, Tom Halverson (halverson(AT)macalester.edu)

Keywords

Comments

It appears that a(n) is divisible by n. - Michael Somos, Jan 29 2004
Somos's conjecture is proved in both Shapovalov (1996) and Venkatachala (2009). - Jeffrey Shallit, Jul 18 2023

Crossrefs

Formula

Partial sums of A019444. - Sean A. Irvine, Mar 17 2019
a(n) = n * A019446(n). - Joerg Arndt, Jul 23 2023
Showing 1-10 of 19 results. Next