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 31 results. Next

A083198 a(n) = A061419(n) - A002379(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 7, 11, 16, 24, 36, 54, 80, 121, 181, 271, 407, 610, 915, 1372, 2058, 3088, 4631, 6947, 10420, 15630, 23446, 35169, 52753, 79129, 118693, 178039, 267059, 400589, 600883, 901324, 1351986, 2027979, 3041968
Offset: 5

Views

Author

Ralf Stephan, Jun 01 2003

Keywords

Comments

lim (a(n) * (2/3)^n) = 2/3 * A083286 - 1.

Programs

  • PARI
    p=1; for(n=2, 100, p=p+ceil(p/2); print1(p-floor((3/2)^n)", "))

A083199 Exponent of largest power of 2 dividing A061419(n).

Original entry on oeis.org

0, 1, 0, 0, 3, 2, 1, 0, 0, 1, 0, 2, 1, 0, 0, 1, 0, 1, 0, 2, 1, 0, 0, 1, 0, 2, 1, 0, 1, 0, 5, 4, 3, 2, 1, 0, 0, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 2, 1, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 5, 4, 3, 2, 1, 0
Offset: 1

Views

Author

Ralf Stephan, Jun 01 2003

Keywords

Programs

  • PARI
    p=1; for(n=1, 100, p=p+ceil(p/2); print1(valuation(p, 2)", "))

A083279 Length of odd/even runs in A061419, where a(2n)=length of n-th run of even numbers in A061419 and a(2n-1)=length of n-th run of odd numbers.

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 5, 2, 1, 1, 7, 1, 1, 5, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 4, 1, 2, 1, 6, 1, 1, 5, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 4, 3, 2, 3, 3, 1, 4, 1, 1, 2, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 5
Offset: 1

Views

Author

Ralf Stephan, Jun 02 2003

Keywords

Comments

Parity of A061419(n) can be fully reconstructed from this sequence.

Programs

  • PARI
    p=1; c=0; r=0; for(n=1, 1000, p=p+ceil(p/2);  if(p%2==r, c=c+1, print1(c", "); r=!r; c=1))

A073941 a(n) = ceiling((Sum_{k=1..n-1} a(k)) / 2) for n >= 2 starting with a(1) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 9, 14, 21, 31, 47, 70, 105, 158, 237, 355, 533, 799, 1199, 1798, 2697, 4046, 6069, 9103, 13655, 20482, 30723, 46085, 69127, 103691, 155536, 233304, 349956, 524934, 787401, 1181102, 1771653, 2657479, 3986219, 5979328, 8968992
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 20 2002

Keywords

Comments

a(n) is the number of even integers that have n-1 digits when written in base 3/2. For example, there are 2 even integers that use three digits in base 3/2: 6 and 8: they are written as 210 and 212, respectively. - Tanya Khovanova and PRIMES STEP Senior group, Jun 03 2018
From Petros Hadjicostas, Jul 20 2020: (Start)
We describe Schuh's counting-off game (pp. 373-375 and 377-379). Assume m people are standing on a circle and they are labeled 1 through m (say clockwise). We start with the person labeled 1 and every 3rd person drops out (in a variation of the famous Josephus problem). The process is repeated until only one person is left.
This sequence describes those numbers m for which either the person labeled 1 or the person labeled 2 is the last survivor.
From a(4) = 2 to a(53) = 775795914 (see T. D. Noe's b-file), the values agree with those in Schuh (1968, p. 374) and Burde (1987, p. 207). a(54) = 1163693871 while both Schuh and Burde have 1063693871 (a difference in the 2nd digit starting on the left). a(55) = 1745540806 while both Schuch and Burde have 1595540806.
Schuh (1968) obtains the numbers in the following way. Suppose we know a(n) and the corresponding number i(n) of the last survivor (i(n) = 1 or 2). We multiply a(n) by 3/2 (cf. Burde's use of fractional bases).
If the product is an integer, that is a(n+1) and the corresponding last survivor is the same.
If the product is not an integer, then a(n+1) = floor(a(n)*3/2) if the last survivor i(n) = 2 (and the new last survivor is i(n+1) = 1), and a(n+1) = ceiling(a(n)*3/2) if the last survivor is i(n) = 1 (and the new last survivor is i(n+1) = 2).
Note that a(53) = 775795914 and a(54) = (3/2)*a(53) = 1163693871 (not 1063693871), so it seems Schuh did a mistake and Burde copied it. Also (3/2)*1163693871 = 1745540806.5. Since a(53) = 775795914 corresponds to number 2, we round down, i.e., a(54) = 1745540806 (and move to number 1). If, however, we multiply the incorrect 1063693871 by 3/2 and round down, we get Schuh and Burde's incorrect value 1595540806 for a(54).
Numbers a(n) that correspond to last survivors being number 1 are tabulated in A081614 while numbers a(n) that correspond to last survivors being number 2 are tabulated in A081615. (End)
a(n) is the number of times (n-1) appears in A061420. - Chinmaya Dash, Aug 19 2020

References

  • Fred Schuh, The Master Book of Mathematical Recreations, Dover, New York, 1968. [See Table 18, p. 374. Only the terms from a(6) = 4 forward are shown in the table. The table is definitely related to this sequence.]

Crossrefs

Same as log_2(A082125(n)), for n > 2. - Ralf Stephan, Apr 16 2002
Apart from initial term, same as A005428, which has further information.
a(n+4) = A079719(n)+2. Cf. A082416.
Partial sums for various start indices are in A006999, A061419, A061418. - Ralf Stephan, Apr 17 2003
Is this the same as A081848/3?
The constant c is (2/9)*K(3) (see A083286). - Ralf Stephan, May 29 2003

Programs

  • Haskell
    a073941 n = a073941_list !! (n-1)
    a073941_list = 1 : f [1] where
       f xs = x' : f (x':xs) where x' = (1 + sum xs) `div` 2
    -- Reinhard Zumkeller, Oct 26 2011
    
  • Mathematica
    f[s_] := Append[s, Ceiling[Plus @@ s/2]]; Nest[f, {1}, 41] (* Robert G. Wilson v, Jul 07 2006 *)
  • PARI
    v=vector(100);s=v[1]=1;for(i=2,#v,s+=(v[i]=(s+1)\2));v \\ Charles R Greathouse IV, Feb 11 2011
    
  • Python
    from itertools import islice
    def A073941_gen(): # generator of terms
        a, c = 1, 0
        yield 1
        while True:
            yield (a:=(c:=c+a)+1>>1)
    A073941_list = list(islice(A073941_gen(),70)) # Chai Wah Wu, Sep 20 2022

Formula

a(n) = ceiling(c*(3/2)^n-1/2) where c = 0.3605045561966149591015446628665... - Benoit Cloitre, Nov 22 2002
If 2^m divides a(i) then 2^(m-1)*3^1 divides a(i+1) and so on... until finally, 3^m divides a(i+m). - Ralf Stephan, Apr 20 2003
a(n) = A081848(n)/3. - Tom Edgar, Jul 21 2014
a(n) = A005428(n-2). - Tanya Khovanova and PRIMES STEP Senior group, Jun 03 2018

A061418 a(n) = floor(a(n-1)*3/2) with a(1) = 2.

Original entry on oeis.org

2, 3, 4, 6, 9, 13, 19, 28, 42, 63, 94, 141, 211, 316, 474, 711, 1066, 1599, 2398, 3597, 5395, 8092, 12138, 18207, 27310, 40965, 61447, 92170, 138255, 207382, 311073, 466609, 699913, 1049869, 1574803, 2362204, 3543306, 5314959, 7972438
Offset: 1

Views

Author

Henry Bottomley, May 02 2001

Keywords

Comments

Can be stated as the number of animals starting from a single pair if any pair of animals can produce a single offspring (as in the game Minecraft, if the player allows offspring to fully grow before breeding again). - Denis Moskowitz, Dec 05 2012
Maximum number of partial products that can be added in a Wallace tree multiplier with n-1 full adder stages. - Chinmaya Dash, Aug 19 2020

Examples

			a(6) = floor(9*3/2) = 13.
		

Crossrefs

First differences are in A073941.

Programs

  • Magma
    [ n eq 1 select 2 else Floor(Self(n-1)*(3/2)): n in [1..39] ]; // Klaus Brockhaus, Nov 14 2008
    
  • PARI
    { a=4/3; for (n=1, 500, a=a*3\2; write("b061418.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 22 2009
    
  • PARI
    first(n) = my(v=vector(n)); v[1]=2; for(i=2, n, v[i]=v[i-1]*3\2); v \\ Iain Fox, Jul 15 2022
    
  • Python
    from itertools import islice
    def A061418_gen(): # generator of terms
        a = 2
        while True:
            yield a
            a += a>>1
    A061418_list = list(islice(A061418_gen(),70)) # Chai Wah Wu, Sep 20 2022

Formula

a(n) = A061419(n) + 1 = ceiling(K*(3/2)^n) where K = 1.08151366859...
The constant K is (2/3)*K(3) (see A083286). - Ralf Stephan, May 29 2003

A005428 a(n) = ceiling((1 + sum of preceding terms) / 2) starting with a(0) = 1.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 14, 21, 31, 47, 70, 105, 158, 237, 355, 533, 799, 1199, 1798, 2697, 4046, 6069, 9103, 13655, 20482, 30723, 46085, 69127, 103691, 155536, 233304, 349956, 524934, 787401, 1181102, 1771653, 2657479, 3986219, 5979328, 8968992, 13453488, 20180232, 30270348, 45405522, 68108283, 102162425, 153243637, 229865456, 344798184
Offset: 0

Views

Author

Keywords

Comments

Original definition: a(0) = 1, state(0) = 2; for n >= 1, if a(n-1) is even then a(n) = 3*a(n-1)/2 and state(n) = state(n-1); if a(n-1) is odd and state(n-1) = 1 then a(n) = ceiling( 3*a(n-1)/2) and state(n) = 3 - state(n-1) and if a(n-1) is odd and state(n-1) = 2 then a(n) = floor( 3*a(n-1)/2) and state(n) = 3 - state(n-1). [See formula by M. Alekseyev for a simpler equivalent. - Ed.]
Arises from a version of the Josephus problem: sequence gives set of n where, if you start with n people and every 3rd person drops out, either it is person #1 or #2 who is left at the end. A081614 and A081615 give the subsequences where it is person #1 (respectively #2) who is left.
The state changes just when a(n) is odd: it therefore indicates whether the sum of a(0) to a(n) is odd (1 means no, 2 means yes).
The sum a(0) to a(n) is never divisible by 3 (for n >= 0); it is 1 mod 3 precisely when the sum a(0) to a(n-1) is odd and thus indicates the state at the previous step. - Franklin T. Adams-Watters, May 14 2008
The number of nodes at level n of a planted binary tree with alternating branching and non-branching nodes. - Joseph P. Shoulak, Aug 26 2012
Take Sum_{k=1..n} a(k) objects, and partition them into 3 parts. It is always possible to generate those parts using addends once each from the initial n terms, and this is the fastest growing sequence with this property. For example, taking 1+1+2+3+4+6+9 = 26 objects, if we partition them [10,9,7], we can generate these sizes as 10 = 9+1, 9 = 6+3, 7 = 4+2+1. The corresponding sequence partitioning into 2 parts is the powers of 2, A000079. In general, to handle partitioning into k parts, replace the division by 2 in the definition with division by k-1. - Franklin T. Adams-Watters, Nov 07 2015
a(n) is the number of even integers that have n+1 digits when written in base 3/2. For example, there are 2 even integers that use three digits in base 3/2: 6 and 8: they are written as 210 and 212, respectively. - Tanya Khovanova and PRIMES STEP Senior group, Jun 03 2018

Examples

			n........0...1...2...3...4...5...6...7...8...9..10..11..12..13..14.
state=1......1...........4...6...9..........31.....70..105.........
state=2..1.......2...3..............14..21......47.........158..237
		

References

  • F. Schuh, The Master Book of Mathematical Recreations. Dover, NY, 1968, page, 374, Table 18, union of columns 1 and 2 (which are A081614 and A081615).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005427, A073941, A082416. Union of A081614 and A081615.
First differences of D_3(n) (A061419) in the terminology of Odlyzko and Wilf. - Ralf Stephan, Apr 23 2002
Same as log_2(A082125(n+3)). - Ralf Stephan, Apr 16 2002
Apart from initial terms, same as A073941, which has further information.
a(n) is the number of positive even k for which A024629(k) has n+1 digits. - Glen Whitney, Jul 09 2017
Partial sums are in A061419, A061418, A006999.

Programs

  • Haskell
    a005428 n = a005428_list !! n
    a005428_list = (iterate j (1, 1)) where
       j (a, s) = (a', (s + a') `mod` 2) where
         a' = (3 * a + (1 - s) * a `mod` 2) `div` 2
    -- Reinhard Zumkeller, May 10 2015 (fixed), Oct 26 2011
    
  • Mathematica
    f[s_] := Append[s, Ceiling[(1 + Plus @@ s)/2]]; Nest[f, {1}, 40] (* Robert G. Wilson v, Jul 07 2006 *)
    nxt[{t_,a_}]:=Module[{c=Ceiling[(1+t)/2]},{t+c,c}]; NestList[nxt,{1,1},50][[All,2]] (* Harvey P. Dale, Nov 05 2017 *)
  • PARI
    { a=1; s=2; for(k=1,50, print1(a,", "); a=(3*a+s-1)\2; s=(s+a)%3; ) } \\ Max Alekseyev, Mar 28 2009
    
  • PARI
    s=0;vector(50,n,-s+s+=s\2+1)  \\ M. F. Hasler, Oct 14 2012
    
  • Python
    from itertools import islice
    def A005428_gen(): # generator of terms
        a, c = 1, 0
        yield 1
        while True:
            yield (a:=1+((c:=c+a)>>1))
    A005428_list = list(islice(A005428_gen(),30)) # Chai Wah Wu, Sep 21 2022

Formula

a(0) = 1; a(n) = ceiling((1 + Sum_{k=0..n-1} a(k)) / 2). - Don Reble, Apr 23 2003
a(1) = 1, s(1) = 2, and for n > 1, a(n) = floor((3*a(n-1) + s(n-1) - 1) / 2), s(n) = (s(n-1) + a(n)) mod 3. - Max Alekseyev, Mar 28 2009
a(n) = floor(1 + (sum of preceding terms)/2). - M. F. Hasler, Oct 14 2012

Extensions

More terms from Hans Havermann, Apr 23 2003
Definition replaced with a simpler formula due to Don Reble, by M. F. Hasler, Oct 14 2012

A054995 A version of Josephus problem: a(n) is the surviving integer under the following elimination process. Arrange 1,2,3,...,n in a circle, increasing clockwise. Starting with i=1, delete the integer two places clockwise from i. Repeat, counting two places from the next undeleted integer, until only one integer remains.

Original entry on oeis.org

1, 2, 2, 1, 4, 1, 4, 7, 1, 4, 7, 10, 13, 2, 5, 8, 11, 14, 17, 20, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 1, 4, 7, 10, 13, 16, 19, 22, 25
Offset: 1

Views

Author

John W. Layman, May 30 2000

Keywords

Comments

If one counts only one place (rather than two) at each stage to determine the element to be deleted, the Josephus survivors (A006257) are obtained.

Examples

			a(5) = 4 because the elimination process gives (1^,2,3,4,5) -> (1,2,4^,5) -> (2^,4,5) -> (2^,4) -> (4), where ^ denotes the counting reference position.
a(13) = 13 => a(14) = (a(13) + 2) mod 14 + 1 = 2. - _Paul Weisenhorn_, Oct 10 2010
		

Crossrefs

Cf. A181281 (with s=5). - Paul Weisenhorn, Oct 10 2010

Programs

  • Mathematica
    (* First do *) Needs["Combinatorica`"] (* then *) f[n_] := Last@ InversePermutation@ Josephus[n, 3]; Array[f, 70] (* Robert G. Wilson v, Jul 31 2010 *)
    Table[Nest[Rest@RotateLeft[#, 2] &, Range[n], n - 1], {n, 72}] // Flatten (* Arkadiusz Wesolowski, Jan 14 2013 *)

Formula

a(n) = 3*n + 1 - floor(K(3)*(3/2)^(ceiling(log((2*n+1)/K(3))/log(3/2)))) where K(3) = (3/2)*K = 1.622270502884767... (K is the constant described in A061419); a(n) = 3n + 1 - A061419(k+1) where A061419(k+1) is the least integer such that A061419(k+1) > 2n.
a(1) = 1 and, for n > 1, a(n) = (a(n-1) + 3) mod n, if this value is nonzero, n otherwise.
a(n) = (a(n-1) + 2) mod n + 1. - Paul Weisenhorn, Oct 10 2010

A083044 Square table read by antidiagonals forms a permutation of the natural numbers: T(n,0) = floor(n*x/(x-1))+1, T(n,k+1) = ceiling(x*T(n,k)), where x=3/2, n >= 0, k >= 0.

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 5, 9, 11, 10, 8, 14, 17, 15, 13, 12, 21, 26, 23, 20, 16, 18, 32, 39, 35, 30, 24, 19, 27, 48, 59, 53, 45, 36, 29, 22, 41, 72, 89, 80, 68, 54, 44, 33, 25, 62, 108, 134, 120, 102, 81, 66, 50, 38, 28, 93, 162, 201, 180, 153, 122, 99, 75, 57, 42, 31, 140, 243
Offset: 0

Views

Author

Paul D. Hanna, Apr 18 2003

Keywords

Comments

First row is A061419, first column is T(n,0) = A016777(n) = 3n+1 (namely the numbers not of the form ceiling(3*k/2) for any natural number k, in increasing order), main diagonal is A083045, antidiagonal sums give A083046. [further detail on first column added by Glen Whitney, Aug 03 2018]
A083044 is the dispersion of the sequence A007494 of positive integers congruent to (0 or 2) mod 3; see A191655. - Clark Kimberling, Jun 10 2011
If T(n+1,k) - T(n,k) = 2m, then T(n+1,k+1) - T(n,k+1) = ceiling(3T(n+1,k)/2) - ceiling(3T(n,k)/2) = ceiling(3T(n,k)/2 + 3m) - ceiling(3T(n,k)/2) = 3m. Similarly, if T(n+1,k) - T(n,k) = 2m+1, then T(n+1,k+1) - T(n,k+1) = ceiling(3T(n,k)/2 + 3m + 3/2) - ceiling(3T(n,k)/2) = {3m+1 or 3m+2, according to whether T(n,k) is even or odd}. The first differences of the first column T(n,0) are periodic: (3)*. The parities of the first column T(n,0) are periodic: (odd,even)*. Hence by induction using the prior two observations, the first differences and parities of every column will be periodic; e.g., for the second column T(n,2): the first differences are (4,5)* and the parities are (even,even,odd,odd)*; for the third column T(n,3): (6,8,6,7)* and (odd,odd,odd,odd,even,even,even,even)*; for the fourth column T(n,4): (9,12,9,10,9,12,9,11)* and (o,e,e,o,o,e,e,o,e,o,o,e,e,o,o,e)*. Is the period length of the first differences of column k always 2^{k-1}? And is the period length of parities always 2^k? Does every integer > 2 occur as T(n+1,k) - T(n,k) for some n and k? Is the smallest first difference in column k always A061418(k+1)? And is the largest first difference in column k always A061419(k+2)? - Glen Whitney, Aug 03 2018
Consider the following two-player game: Start with two nonempty piles of counters. Players alternate taking turns consisting of first discarding one of the piles and then dividing the remaining pile into two nonempty piles. The smaller pile may always be discarded; the larger pile may only be discarded if the smaller pile is at least half as large. (Either pile may be discarded if they are equal.) The player who cannot move (because the configuration has reached two piles of one counter each) loses. Then the numbers c for which two piles of size c is a losing configuration (for the player whose turn it is) are exactly T(4,k) for k > 1, together with 1,3,5, and 9. - Glen Whitney, Aug 03 2018

Examples

			Table begins:
   1  2  3   5   8  12  18  27  41   62   93  140 ...
   4  6  9  14  21  32  48  72 108  162  243  365 ...
   7 11 17  26  39  59  89 134 201  302  453  680 ...
  10 15 23  35  53  80 120 180 270  405  608  912 ...
  13 20 30  45  68 102 153 230 345  518  777 1166 ...
  16 24 36  54  81 122 183 275 413  620  930 1395 ...
  19 29 44  66  99 149 224 336 504  756 1134 1701 ...
  22 33 50  75 113 170 255 383 575  863 1295 1943 ...
  25 38 57  86 129 194 291 437 656  984 1476 2214 ...
  28 42 63  95 143 215 323 485 728 1092 1638 2457 ...
  31 47 71 107 161 242 363 545 818 1227 1841 2762 ...
		

Crossrefs

Row in which a number occurs: A163491.
Column in which a number occurs: A087088.

Formula

T(A163491(n)-1, A087088(n)-1) = n. - Peter Munn, Jul 16 2020 [corrected Peter Munn, Aug 02 2020]

A006999 Partitioning integers to avoid arithmetic progressions of length 3.

Original entry on oeis.org

0, 1, 2, 4, 7, 11, 17, 26, 40, 61, 92, 139, 209, 314, 472, 709, 1064, 1597, 2396, 3595, 5393, 8090, 12136, 18205, 27308, 40963, 61445, 92168, 138253, 207380, 311071, 466607, 699911, 1049867, 1574801, 2362202, 3543304, 5314957, 7972436
Offset: 0

Views

Author

N. J. A. Sloane, D. R. Hofstadter, and James Propp, Jul 15 1977

Keywords

Comments

a(n) = A006997(3^n-1).
It appears that, aside from the first term, this is the (L)-sieve transform of A016789 ={2,5,8,11,...,3n+2....}. This has been verified up to a(30)=311071. See A152009 for the definition of the (L)-sieve transform. - John W. Layman, Nov 20 2008
a(n) is also the largest-index square reachable in n jumps if we start at square 0 of the Infinite Sidewalk. - Jose Villegas, Mar 27 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A061419, A061418, A005428 (first differences), A083286.
Cf. A003312.

Programs

  • Haskell
    a006999 n = a006999_list !! n
    a006999_list = 0 : map ((`div` 2) . (+ 2) . (* 3)) a006999_list
    -- Reinhard Zumkeller, Oct 26 2011
  • Mathematica
    a[0] = 0; a[n_] := a[n] = Floor[(3 a[n-1] + 2)/2];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Aug 01 2018 *)
  • PARI
    a(n)=if(n<1,0,floor((3*a(n-1)+2)/2))
    

Formula

a(n) = A061419(n) - 1.
a(n) = A061418(n) - 2.
a(n) = floor((3a(n-1)+2)/2).
a(n) = -1 + floor(c*(3/2)^n) where c=1.0815136... - Benoit Cloitre, Jan 10 2002; this constant c is 2/3*K(3) (see A083286). - Ralf Stephan, May 29 2003
a(n+1) = (3*a(n))/2+1 if a(n) is even. a(n+1) = (3*a(n)+1)/2 if a(n) is odd. - Miquel Cerda, Jun 15 2019

Extensions

More terms from James Sellers, Feb 06 2000

A070885 a(n) = (3/2)*a(n-1) if a(n-1) is even; (3/2)*(a(n-1)+1) if a(n-1) is odd.

Original entry on oeis.org

1, 3, 6, 9, 15, 24, 36, 54, 81, 123, 186, 279, 420, 630, 945, 1419, 2130, 3195, 4794, 7191, 10788, 16182, 24273, 36411, 54618, 81927, 122892, 184338, 276507, 414762, 622143, 933216, 1399824, 2099736, 3149604, 4724406, 7086609, 10629915
Offset: 1

Views

Author

Eric W. Weisstein, May 14 2002

Keywords

Comments

The smallest positive number such that A024629(a(n)) has n digits, per page 9 of the Tanton reference in Links. - Glen Whitney, Sep 17 2017

References

  • Wolfram, S. A New Kind of Science. Champaign, IL: Wolfram Media, 2002, p. 123.

Crossrefs

The constant K is 2/3*K(3) (see A083286). - Ralf Stephan, May 29 2003
Cf. A003312.
Cf. A081848.
Cf. A205083 (parity of terms).

Programs

  • Haskell
    a070885 n = a070885_list !! (n-1)
    a070885_list = 1 : map (flip (*) 3 . flip div 2 . (+ 1)) a070885_list
    -- Reinhard Zumkeller, Sep 05 2014
    
  • Maple
    A070885 := proc(n)
        option remember;
        if n = 1 then
            return 1;
        elif type(procname(n-1),'even') then
            procname(n-1) ;
        else
            procname(n-1)+1 ;
        end if;
        %*3/2 ;
    end proc:
    seq(A070885(n),n=1..80) ; # R. J. Mathar, Jun 18 2018
  • Mathematica
    NestList[If[EvenQ[#],3/2 #,3/2 (#+1)]&,1,40] (* Harvey P. Dale, May 18 2018 *)
  • Python
    from itertools import islice
    def A070885_gen(): # generator of terms
        a = 1
        while True:
            yield a
            a += (a+1>>1)+(a&1)
    A070885_list = list(islice(A070885_gen(),70)) # Chai Wah Wu, Sep 20 2022

Formula

For n > 1, a(n) = 3*A061419(n) = 3*floor(K*(3/2)^n) where K=1.08151366859... - Benoit Cloitre, Aug 18 2002
a(n) = 3*ceiling(a(n-1)/2). - Benoit Cloitre, Apr 25 2003
a(n+1) = a(n) + A081848(n), for n > 1. - Reinhard Zumkeller, Sep 05 2014
Showing 1-10 of 31 results. Next