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.

Previous Showing 11-20 of 23 results. Next

A133632 a(1)=1, a(n) = (p-1)*a(n-1), if n is even, otherwise a(n) = p*a(n-2), where p = 5.

Original entry on oeis.org

1, 4, 5, 20, 25, 100, 125, 500, 625, 2500, 3125, 12500, 15625, 62500, 78125, 312500, 390625, 1562500, 1953125, 7812500, 9765625, 39062500, 48828125, 195312500, 244140625, 976562500, 1220703125, 4882812500, 6103515625, 24414062500
Offset: 1

Views

Author

Hieronymus Fischer, Sep 19 2007

Keywords

Comments

Binomial transform = A134418: (1, 5, 14, 48, 152, 496, 1600, ...). Double binomial transform = A048875: (1, 6, 25, 106, 449, 1902, ...) - Gary W. Adamson, Oct 24 2007

Crossrefs

For the partial sums see A133629.
Sequences with similar recurrence rules: A016116(p=2), A038754(p=3), A084221(p=4).
Partial sums for other p: A027383(p=2), A087503(p=3), A133628(p=4).
Other related sequences: A132666, A132667, A132668, A132669.

Programs

  • Mathematica
    RecurrenceTable[{a[1]==1,a[2]==4,a[n]==If[EvenQ[n],4a[n-1],5a[n-2]]},a,{n,30}] (* Harvey P. Dale, Jan 14 2013 *)

Formula

The following formulas are given for a general natural parameter p > 1 (p = 5 for this sequence).
G.f.: g(x) = x(1+(p-1)x)/(1-px^2).
a(n) = p^floor((n-1)/2)*(p+(p-2)*(-1)^n)/2.
a(n) = A133629(n) - A133629(n-1) for n > 1.
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011

A132667 a(1)=1, a(n) = 3*a(n-1) if the minimal positive integer not yet in the sequence is greater than a(n-1), else a(n) = a(n-1) - 1.

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, Aug 24 2007, Sep 15 2007, Sep 23 2007

Keywords

Comments

Also: a(1)=1, a(n) = maximal positive integer < a(n-1) not yet in the sequence, if it exists, else a(n) = 3*a(n-1).
Also: a(1)=1, a(n) = a(n-1) - 1, if a(n-1) - 1 > 0 and has not been encountered so far, else a(n) = 3*a(n-1).
A permutation of the positive integers. The sequence is self-inverse, in that a(a(n)) = n.

Crossrefs

For formulas concerning a general parameter p (with respect to the recurrence rule ... a(n)=p*a(n-1) ...) see A132374. For p=2 to p=10 see A132666 through A132674.
Cf. A087503.

Formula

G.f.: g(x) = (x(1-2x)/(1-x) + 3x^2*f'(x^(5/2)) + (5/9)*(f'(x^(1/2)) - 3x - 1))/(1-x) where f(x) = Sum_{k>=0} x^(3^k) and f'(z) = derivative of f(x) at x = z.
a(n) = 4*3^(r/2) - 2 - n if both r and s are even, else a(n) = 7*3^((s-1)/2) - 2 - n, where r = ceiling(2*log_3((2*n+3)/5)), s = ceiling(2*log_3((2*n+3)/3) - 1).
a(n) = (3^floor(1 + (k+1)/2) + 5*3^floor(k/2) - 4)/2 - n, where k=r if r is odd, else k=s (with respect to r and s above; formally, k = ((r+s) - (r-s)*(-1)^r)/2).
a(n) = A087503(m) + A087503(m+1) + 1 - n, where m:=max{ k | A087503(k)
a(A087503(n) + 1) = A087503(n+1).
a(A087503(n)) = A087503(n-1) + 1 for n > 0.

A133629 a(1)=1, a(n) = a(n-1) + (p-1)*p^(n/2-1) if n is even, otherwise a(n) = a(n-1) + p^((n-1)/2), where p=5.

Original entry on oeis.org

1, 5, 10, 30, 55, 155, 280, 780, 1405, 3905, 7030, 19530, 35155, 97655, 175780, 488280, 878905, 2441405, 4394530, 12207030, 21972655, 61035155, 109863280, 305175780, 549316405, 1525878905, 2746582030, 7629394530, 13732910155, 38146972655, 68664550780
Offset: 1

Author

Hieronymus Fischer, Sep 19 2007

Keywords

Comments

Partial sums of A133632.

Crossrefs

Sequences with similar recurrence rules: A027383 (p=2), A087503 (p=3), A133628 (p=4).
Related sequences: A132666, A132667, A132668, A132669.
Other related sequences for different p: A016116 (p=2), A038754 (p=3), A084221 (p=4), A133632 (p=5).

Programs

  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=5*a[n-2]+5 od: seq(a[n], n=1..29); # Zerinvary Lajos, Mar 17 2008
  • PARI
    Vec(x*(1 + 4*x) / ((1 - x) * (1 - 5*x^2)) + O(x^40)) \\ Colin Barker, Nov 25 2016
    
  • Python
    def A133629(n): return (5+((n&1)<<2))*5**(n>>1)-5>>2 # Chai Wah Wu, Sep 02 2025

Formula

a(n) = Sum_{k=1..n} A133632(k).
The following formulas are given for a general natural parameter p > 1 (p=5 for this sequence).
G.f.: x(1+(p-1)x)/((1-px^2)(1-x)).
a(n) = (p/(p-1))*(p^(n/2)-1) if n is even, otherwise a(n)=(p/(p-1))*((2p-1)*p^((n-3)/2)-1).
a(n) = (p/(p-1))*(p^floor(n/2) + p^floor((n-1)/2) - p^floor((n-2)/2)-1).
a(n) = p^floor(n/2) + (p^floor((n+1)/2)-p)/(p-1).
a(n) = A132669(a(n+1)) - 1.
a(n) = A132669(a(n-1)+1) for n > 0.
A132669(a(n)) = a(n-1)+1 for n > 0.
From Colin Barker, Nov 25 2016: (Start)
a(n) = 5*(5^(n/2) - 1)/4 for n even.
a(n) = (9*5^(n/2-1/2) - 5)/4 for n odd.
a(n) = a(n-1) + 5*a(n-2) - 5*a(n-3) for n > 3.
G.f.: x*(1 + 4*x) / ((1 - x) * (1 - 5*x^2)).
(End)

A132668 a(1)=1, a(n) = 4*a(n-1) if the minimal positive integer not yet in the sequence is greater than a(n-1), else a(n) = a(n-1) - 1.

Original entry on oeis.org

1, 4, 3, 2, 8, 7, 6, 5, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49
Offset: 1

Author

Hieronymus Fischer, Aug 24 2007, Sep 15 2007, Sep 23 2007

Keywords

Comments

Also: a(1)=1, a(n) = maximal positive integer < a(n-1) not yet in the sequence, if it exists, else a(n) = 4*a(n-1).
Also: a(1)=1, a(n) = a(n-1) - 1, if a(n-1) - 1 > 0 and has not been encountered so far, else a(n) = 4*a(n-1).
A permutation of the positive integers. The sequence is self-inverse, in that a(a(n)) = n.

Crossrefs

For formulas concerning a general parameter p (with respect to the recurrence rule ... a(n) = p*a(n-1) ...) see A132374.
For p=2 to p=10 see A132666 through A132674.
Cf. A133628.

Formula

a(n) = (11*4^(r/2) - 5)/3 - n, if both r and s are even, else a(n) = (23*4^((s-1)/2) - 5)/3 - n, where r = ceiling(2*log_4((3n+4)/7)) and s = ceiling(2*log_4((3n+4)/8)).
a(n) = (4^floor(1 + (k+1)/2) + 7*4^floor(k/2) - 5)/3 - n, where k=r, if r is odd, else k=s (with respect to r and s above; formally, k = ((r+s) - (r-s)*(-1)^r)/2).
G.f.: g(x) = (x(1-2x)/(1-x) + 4x^2*f'(x^(7/3)) + (7/16)*(f'(x^(1/3)) - 4x - 1))/(1-x) where f(x) = Sum_{k>=0} x^(4^k) and f'(z) = derivative of f(x) at x = z.
a(n) = A133628(m) + A133628(m+1) + 1 - n, where m:=max{ k | A133628(k)
a(A133628(n) + 1) = A133628(n+1).
a(A133628(n)) = A133628(n-1) + 1 for n > 0.

A132669 a(1)=1, a(n) = 5*a(n-1) if the minimal positive integer not yet in the sequence is greater than a(n-1), else a(n) = a(n-1) - 1.

Original entry on oeis.org

1, 5, 4, 3, 2, 10, 9, 8, 7, 6, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143
Offset: 1

Author

Hieronymus Fischer, Sep 15 2007, Sep 23 2007

Keywords

Comments

Also: a(1)=1, a(n) = maximal positive integer < a(n-1) not yet in the sequence, if it exists, else a(n) = 5*a(n-1).
Also: a(1)=1, a(n) = a(n-1) - 1, if a(n-1) - 1 > 0 and has not been encountered so far, else a(n) = 5*a(n-1).
A permutation of the positive integers. The sequence is self-inverse, in that a(a(n)) = n.

Crossrefs

For formulas concerning a general parameter p (with respect to the recurrence rule ... a(n) = p*a(n-1) ...) see A132374.
For p=2 to p=10 see A132666 through A132674.
Cf. A087503.

Formula

G.f.: g(x) = (x(1-2x)/(1-x) + 5x^2*f'(x^(9/4)) + (9/25)*(f'(x^(1/4)) - 5x - 1))/(1-x) where f(x) = Sum_{k>=0} x^(5^k) and f'(z) = derivative of f(x) at x = z.
a(n) = (14*5^(r/2) - 6)/4 - n, if both r and s are even, else a(n) = (34*5^((s-1)/2) - 6)/4 - n, where r = ceiling(2*log_5((4n+5)/9)) and s = ceiling(2*log_5((4n+5)/5)) - 1.
a(n) = (5^floor(1 + (k+1)/2) + 9*5^floor(k/2) - 6)/4 - n, where k=r, if r is odd, else k=s (with respect to r and s above; formally, k = ((r+s) - (r-s)*(-1)^r)/2).
a(n) = A133629(m) + A133629(m+1) + 1 - n, where m:=max{ k | A133629(k) < n }.
a(A133629(n) + 1) = A133629(n+1).
a(A133629(n)) = A133629(n-1) + 1 for n > 0.

A132340 a(n+1) = if {a(k):1<=k<=n} is a permutation of [1:n] then 2*a(n) else a(n)-1.

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 10, 9, 8, 7, 14, 13, 12, 11, 22, 21, 20, 19, 18, 17, 16, 15, 30, 29, 28, 27, 26, 25, 24, 23, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85
Offset: 1

Author

Reinhard Zumkeller, Aug 20 2007

Keywords

Comments

Self-inverse permutation of natural numbers;
a(A052955(n)) = A027383(n);
a(A052955(n)-1)=a(A052955(n))/2; a(A052955(n)+1)=a(A052955(n))-1.
Almost certainly A132666 is a duplicate of this entry. - R. J. Mathar, Jun 12 2008

A182194 a(1)=2, a(n)=a(n-1)^2 if the minimal natural number > 1 not yet in the sequence is greater than a(n-1), else a(n)=a(n-1)-1.

Original entry on oeis.org

2, 4, 3, 9, 8, 7, 6, 5, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54
Offset: 1

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

A reordering of the natural numbers > 1.
The sequence is quasi self-inverse in that a(a(n-1)-1)=n.

Examples

			a(2)=4=a(1)^2, since 3>2=a(1) is the minimal number not yet in the sequence (because of a(1)=2);
a(15)=19=a(14)-1, since the minimal number not yet in the sequence (=10) is <=a(14)=20.
a(10^4)=b(8)+b(7)-10^4-2=877.
a(10^6)=b(10)+b(9)-10^6-2= 103539133.
		

Formula

a(n)=a(n-1)-1, if a(n-1)-1 > 1 is not in the set {a(k)| 1<=k<=n-1}, else a(n)=a(n-1)^2.
a(a(n)-1)=n+1.
If we define b(1)=2, b(2)=3, b(k)=b(k-2)^2+1, we get the sequence 2, 3, 5, 10, 26, 101, 677, 10202, 458330, 104080805, …. The b(k) are those terms a(n) of the original sequence for which a(n+1)=a(n)^2.
With these b(k) we obtain for k>1:
a(b(k)-2)=b(k-1),
a(b(k)-1)=b(k-1)^2.
a(b(k))=b(k-1)^2 - 1.
a(n)=b(m)+b(m-1)-n-2, where m is the least index such that b(m)>n+1 (valid for n>=1).

A210882 a(1)=1, a(n)=a(n-1)-1 if a(n-1)-1 > 0 is not in the set {a(k)| 1<=k

Original entry on oeis.org

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

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

A reordering of the natural numbers.
The sequence is self-inverse in that a(a(n))=n.
If n is a prime, then a(n+1) is the next prime > n. Hence, the subsequence 2, a(2+1), a(a(2+1)+1), a(a(a(2+1)+1)+1), a(a(a(a(2+1)+1)+1)+1), ... generates the sequence of primes A000040.

Examples

			a(4)=5, since 5 is the least prime > a(1), a(2), a(3), and the minimal number not yet in the sequence (=4) is greater than 3=a(3).
a(5)=4, since 4 is not in the set {1,2,3,5}={a(k)| 1<=k<n}.
7=p(4)=a(p(3)+1)=a(a(p(2)+1)+1)= a(a(a(p(1)+1)+1)+1)= a(a(a(2+1)+1)+1).
		

Formula

a(1)=1, a(n)=p (where p is the least prime number > a(k) for 1<=k
a(n)<>n for all n>3.
p(n+1)=a(p(n)+1), where p(n) is the n-th prime.
a(n+1)=p(m+2), if a(n)-1 is the m-th prime, else a(n+1)=a(n)-1, for n>2.
a(n)=p(m)+p(m-1)-n+1, where m is the least index such that p(m)>n-1 (valid for n>2).

A327883 a(0)=a(1)=0; thereafter a(n+1) is the index of the earliest as yet unused occurrence of a(n) if a(n) has occurred before; otherwise a(n+1) = a(a(n)-1). Once an occurrence of a(n) has been used it cannot be used again.

Original entry on oeis.org

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

Author

David James Sycamore, Oct 10 2019

Keywords

Comments

For n > 2, a(n+1) is either the index or repeat of an earlier term (see Name). Hence terms are referred to here as being "index" or "repeat" respectively. Starting from a(3)=1, index and repeat terms occur alternatively throughout the sequence.
a(n) < n for all n >= 0. For k >= 2, numbers 0,1,...,2^k-2 occur as terms in the interval between a(2^k-2) = 0 and a(2^(k+1)-2) = 0; see Formula (e.g., k = 2 --> 0,1,2 occur between a(2) and a(6); k = 3 --> 0,1,..,6 occur between a(6) and a(14)). Thus every integer >= 0 occurs infinitely many times in the sequence.
There appears to be a proper copy subsequence given by a(4*m+2) = a(m-1); m >0 (noticed by Carl J Love). There may be other (independent) copies to be found (e.g. by selecting terms sequentially, one from each of the above mentioned intervals). A family of sequences similar to this one can be described using the same rule as above, with offset k >= 0 and initial terms a(k) = a(k+1) = k. Conjecture: Every such sequence contains a proper copy of itself as a(4*m+2+k) = a(m+k-1).
Index terms > 0 are 1,2,4,3,6,5,10,9,8,7,14,13,... (see A132666). Repeat terms from a(4)=0 are 0,0,1,0,2,0,3,1,4,0,5,2,6,0,7,... (union of the nonnegative integers interleaved with the copy subsequence described above).
For any n >= 0, a k >= 0 exists such that a^k(n)=0 (e.g., n=5 -> k=2; a^2(5)=0).
Replacing a(a(n)-1) with a(a(n)+1) in the Name produces A025480 with 0 prepended.

Examples

			a(2) = 0 since a(1) = 0 was last seen as a(0); a(3) = 1 since a(2) = 0 was last seen as a(1); a(4) = 0 since a(3) = 1 has not been seen before, so a(4) = a(a(3)-1) = a(0) = 0; a(327883)=163736.
		

Crossrefs

Programs

Formula

Conjectured formulae:
a(2^k-2)=0 = a(3*2^k-2) = 0; (k>=0).
a(5*2^k-2) = 1, a(7*2^k-2) = 2, (k>=0).
a(11*2^(2*k)-2) = a(9*2^(2*k+1)-2) = 3 (k>=0).
a(11*2^(2*k+1)-2) = a(9*2^(2k)-2) = 4 (k>=0).
a(2*k+1) = A132666(k); k >= 1.
a(4*k) = k-1; k >= 1.
1st-level copy subsequence: a(k-1) = a(4*k+2), k >= 1.
(m-th)-level (dependent) copy subsequence: a(k) = a(4^m*(k+2) - 2), m >= 1, k >= 0.

A132673 a(1)=1, a(n) = 9*a(n-1) if the minimal positive integer number not yet in the sequence is greater than a(n-1), else a(n) = a(n-1) - 1.

Original entry on oeis.org

1, 9, 8, 7, 6, 5, 4, 3, 2, 18, 17, 16, 15, 14, 13, 12, 11, 10, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37
Offset: 1

Author

Hieronymus Fischer, Sep 15 2007

Keywords

Comments

Also: a(1)=1, a(n) = maximal positive number < a(n-1) not yet in the sequence, if it exists, else a(n) = 9*a(n-1).
Also: a(1)=1, a(n) = a(n-1) - 1, if a(n-1) - 1 > 0 and has not been encountered so far, else a(n) = 9*a(n-1).
A permutation of the positive integers. The sequence is self-inverse, in that a(a(n)) = n.

Crossrefs

For formulas concerning a general parameter p (with respect to the recurrence rule ... a(n) = p*a(n-1) ...) see A132374.
For p=2 to p=10 see A132666 through A132674.

Formula

G.f.: g(x) = (x(1-2x)/(1-x) + 9x^2*f'(x^(17/8)) + (17/81)*(f'(x^(1/8)) - 9x - 1)/(1-x) where f(x) = Sum_{k>=0} x^(9^k) and f'(z) = derivative of f(x) at x = z.
a(n) = (26*9^(r/2) - 10)/8 - n if both r and s are even, else a(n) = (107*9^((s-1)/2) - 10)/8 - n, where r = ceiling(2*log_9((8n+9)/17)) and s = ceiling(2*log_9(8n+9)/8)) - 1.
a(n) = (9^floor(1 + (k+1)/2) + 17*9^floor(k/2) - 10)/8 - n, where k=r if r is odd, else k=s (with respect to r and s above; formally, k = ((r+s) - (r-s)*(-1)^r)/2).
Previous Showing 11-20 of 23 results. Next