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.

User: Nico Brown

Nico Brown's wiki page.

Nico Brown has authored 15 sequences. Here are the ten most recent ones:

A248573 An irregular triangle giving the Collatz-Terras tree.

Original entry on oeis.org

1, 2, 4, 8, 5, 16, 3, 10, 32, 6, 20, 21, 64, 12, 13, 40, 42, 128, 24, 26, 80, 84, 85, 256, 48, 17, 52, 53, 160, 168, 170, 512, 96, 11, 34, 104, 35, 106, 320, 336, 113, 340, 341, 1024, 192, 7, 22, 68, 69, 208, 23, 70, 212, 213, 640, 672, 75, 226, 680, 227, 682, 2048
Offset: 0

Author

Nico Brown, Oct 08 2014

Keywords

Comments

From Wolfdieter Lang, Oct 31 2014: (Start)
(old name corrected)
Irregular triangle CT(l, m) such that the first three rows l = 0, 1 and 2 are 1, 2, 4, respectively, and for l >= 3 the row entries CT(l, m) are obtained from replacing the numbers of row l-1 by (2*x-1)/3, 2*x if they are 2 (mod 3) and by 2*x otherwise.
The modified Collatz (or Collatz-Terras) map sends a positive number x to x/2 if it is even and to (3*x+1)/2 if it is odd (see A060322). The present tree (without the complete tree originating at CT(2,1) = 1) can be considered as an incomplete binary tree, with nodes (vertices) of out-degree 2 if they are 2 (mod 3) and out-degree 1 otherwise. In the example below, the edges (branches) could be labeled L (left) or V (vertical).
The row length sequence is A060322(l+1), l>=0. (End)
The Collatz conjecture is true if and only if all odd numbers appear in this sequence.
This sequence is similar to A127824.

Examples

			The irregular triangle CT(l,m) begins:
l\m   1   2  3   4   5   6   7   8   9  10  11   12  13   14   15  16  17   18   19  20  21   22   23   24 ...
0:    1
1:    2
2:    4  here the 1, which would generate the complete tree again, is omitted
3:    8
4:    5  16
5:    3  10 32
6:    6  20 21  64
7:   12  13 40  42 128
8:   24  26 80  84  85 256
9:   48  17 52  53 160 168 170 512
10:  96  11 34 104  35 106 320 336 113 340 341 1024
11: 192   7 22  68  69 208  23  70 212 213 640  672  75  226  680 227 682 2048
12: 384  14 44  45 136 138 416  15  46 140 141  424 426 1280 1344 150 452  453 1360 151 454 1364 1365 4096
... reformatted, and extended - _Wolfdieter Lang_, Oct 31 2014
--------------------------------------------------------------------------------------------------------------
From _Wolfdieter Lang_, Oct 31 2014: (Start)
The Collatz-Terras tree starting with 4 looks like (numbers x == 2 (mod 3) are marked with a left bar, and the left branch ends then in (2*x-1)/3 and the vertical one in 2*x)
l=2:                                                                                        4
l=3:                                                                                       |8
l=4:                                                    |5                                 16
l=5:    3                                               10                                |32
l=6:    6                                              |20   21                            64
l=7:   12                     13                        40   42                          |128
l=8:   24                    |26                       |80   84            85             256
l=9:   48           |17       52              |53      160  168          |170            |512
l=10:  96     |11    34     |104        |35   106      320  336     |113  340      |341  1024
l=11: 192   7  22   |68  69  208   23|   70   212  213 640  672  75  226  680  227  682  2048
...
E.g., x = 7 = CT(11, 2) leads back to 4 via 7, 11, 17, 26, 13, 20, 10, 5, 8, 4, and from there back to 2, 1.
(End)
--------------------------------------------------------------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    Join[{{1}, {2}}, NestList[Flatten[Map[If[Mod[#, 3] == 2, {(2*#-1)/3, 2*#}, 2*#]&, #]]&, {4}, 10]] (* Paolo Xausa, Jan 25 2024 *)
  • PARI
    rows(N) = my(r=List(),x); for(i=0, min(2, N), listput(r, x=[2^i])); for(n=3, N, my(w=List()); for(i=1, #x, my(q=2*x[i]); if(1==q%3, listput(w, (q-1)/3)); listput(w, q)); listput(r, x=Vec(w))); Vec(r); \\ Ruud H.G. van Tol, Jan 25 2024

Extensions

Edited. New name (old corrected name as comment). - Wolfdieter Lang, Oct 31 2014

A246758 Prime numbers of the form (2^(m*n)-1)/((2^m-1)*(2^n-1)).

Original entry on oeis.org

3, 11, 43, 151, 683, 2731, 43691, 174763, 599479, 2796203, 715827883, 2932031007403, 10052678938039, 145295143558111, 581283643249112959, 658812288653553079, 768614336404564651, 9520972806333758431, 201487636602438195784363
Offset: 1

Author

Nico Brown, Sep 02 2014

Keywords

Comments

The sequence contains A000979 as a subsequence.
Both m and n must be prime.

Examples

			For m=3 and n=5, (2^15-1)/((2^3-1)(2^5-1))=151 is prime, so 151 is a member of the sequence.
		

Crossrefs

Primes in A140803.

Programs

  • Maple
    N:= 200: # to use all (p, q) with p*q < N
    Primes:= select(isprime, [$2..floor(N/2)]):
    A:= {}:
    for i from 1 to nops(Primes) do
      p:= Primes[i];
      Qs:= select(q -> q < N/p, [seq(Primes[j], j=1..i-1)]);
      A:= A union {seq((2^(p*q)-1)/(2^p-1)/(2^q-1), q=Qs)};
    od:
    # in Maple 12 and up
    select(isprime, A);
    # or in earlier Maple versions
    sort([select(isprime, , A); # _)[]])[];
    # Robert Israel, Sep 02 2014

A225784 Denominators of the sum of the reciprocals of the Collatz (3x+1) sequence beginning at n.

Original entry on oeis.org

1, 2, 240, 4, 80, 80, 272272, 8, 350064, 80, 38896, 240, 208, 272272, 4095840, 16, 3536, 116688, 21431696, 80, 1344, 38896, 1365280, 80, 535792400, 208, 44841486948146266934850832405421294927083491752830032389039800908293040266400, 38896, 1127984, 1365280
Offset: 1

Author

Nico Brown, May 15 2013

Keywords

Comments

If the sum of the reciprocals of a Collatz sequence is bounded, there are no Collatz cycles other than 4,2,1,4,2,1,...
a(n) = denominator of Sum_{k = 1..A006577(n)} 1/A070165(n,k). - Reinhard Zumkeller, May 16 2013

Examples

			For n=9 the Collatz sequence is {9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 4, 2, 1}.  So the sum of the reciprocals is 1/9 + 1/28 + 1/14 + 1/7 + 1/22 + 1/11 + ... + 1/4 + 1/2 + 1/1 = 1061683/350064, whose denominator is 350064.
		

Crossrefs

Cf. A225761 (numerators), A087226.
Cf. A225843.

Programs

  • Haskell
    import Data.Ratio (denominator)
    a225784 = denominator . sum . map (recip . fromIntegral) . a070165_row
    -- Reinhard Zumkeller, May 16 2013
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[Denominator[Total[1/Collatz[n]]], {n, 40}] (* T. D. Noe, May 15 2013 *)

Extensions

Extended by T. D. Noe, May 15 2013

A225761 Numerators of the sums of reciprocals of the Collatz (3x+1) sequence beginning with n and stopping at 1.

Original entry on oeis.org

1, 3, 617, 7, 171, 219, 766329, 15, 1061683, 179, 102151, 677, 497, 785777, 10380059, 31, 8861, 360377, 60226515, 183, 2731, 103919, 3339321, 229, 1548244271, 505, 129481899470258402665619129356105706380861444925035330406812603986229803685477, 113643
Offset: 1

Author

Nico Brown, May 14 2013

Keywords

Comments

If the sum of the reciprocals of a Collatz sequence is bounded, there are no cycles other than 4,2,1.
a(n) = numerator of sum (1/A070165(n,k): k = 1..A006577(n)). - Reinhard Zumkeller, May 16 2013

Examples

			For n=9 the Collatz sequence is {9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 4, 2, 1}.  So the sum of the reciprocals is 1/9 + 1/28 + 1/14 + 1/7 + 1/22 + 1/11 + ... + 1/4 + 1/2 + 1/1 = 1061683/350064, whose numerator is 1061683.
		

Crossrefs

Cf. A087226, A225784 (denominators).
Cf. A225843.

Programs

  • Haskell
    import Data.Ratio (numerator)
    a225761 = numerator . sum . map (recip . fromIntegral) . a070165_row
    -- Reinhard Zumkeller, May 16 2013
  • Mathematica
    Table[Numerator[Total[1/Collatz[n]]], {n, 40}] (* T. D. Noe, May 15 2013 *)

Extensions

Extended by T. D. Noe, May 15 2013

A218253 The number of steps it takes, by taking the smallest number so that it minus the number of ones in its binary representation is the previous number, to reach a number which has no others that satisfy this property.

Original entry on oeis.org

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

Author

Nico Brown, Oct 24 2012

Keywords

Comments

A218252 is divided into groups with length the numbers with odd position in this sequence.

Examples

			For n=7, the numbers you get are 7,8,10,12, and because this takes 3 steps, the 7th term is 3.
		

Crossrefs

Programs

  • PARI
    f(n)=for(k=n+1,n+log(n)\log(2)+1,if(k-hammingweight(k)==n,return(k)))
    a(n)=my(k);while(n=f(n),k++);k \\ Charles R Greathouse IV, Oct 29 2012

A218254 Irregular table, where row n (n >= 0) starts with n, the next term is n-A000120(n), and the successive terms are obtained by repeatedly subtracting the number of 1's in the previous term's binary expansion, until zero is reached, after which the next row starts with one larger n.

Original entry on oeis.org

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

Author

Nico Brown, Oct 24 2012

Keywords

Examples

			The n-th row (starting indexing from zero) in this irregular table consists of block of length A071542(n)+1: 1,2,3,3,4,4,5,5,... which always ends with zero, as:
0
1,0
2,1,0
3,1,0
4,3,1,0
5,3,1,0
6,4,3,1,0
7,4,3,1,0
The 17th term is 6, which in binary is 110. The 18th term is then 6-2=4.
		

Crossrefs

Cf. A218252, A218253. A213707 gives the positions of zeros (i.e. the ending index of each row). A071542, A000120.
The reversed tails of the rows converge towards A179016.

Programs

  • PARI
    for(n=0,9,k=n;while(k, print1(k", "); k-=hammingweight(k)); print1("0, ")) \\ Charles R Greathouse IV, Oct 30 2012

A218271 a(n) = a(n-1)^a(n-2) + a(n-3) with a(0) = a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 10, 1002, 1020180963368077455371525121027
Offset: 0

Author

Nico Brown, Oct 24 2012

Keywords

Comments

a(8) has over 30000 digits.

Examples

			a(3) = a(2)^a(1) + a(0) = 1^1+1 = 1+1 = 2.
		

Crossrefs

Programs

  • Mathematica
    t = {1, 1, 1}; Do[AppendTo[t, t[[-1]]^t[[-2]] + t[[-3]]], {5}]; t (* T. D. Noe, Oct 29 2012 *)

A218252 Start with 1. For each term m, the next term is the smallest positive integer k such that k - (sum of base 2 digits of k) = m. If no such k exists, use the smallest natural number not already in the sequence.

Original entry on oeis.org

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

Author

Nico Brown, Oct 24 2012

Keywords

Comments

The sequence is a permutation of the positive integers.

Examples

			To obtain the 2nd term, take the first, 1.  What is the smallest integer k so that k - the number of 1's in k's binary representation is 1? The answer, obviously, is 2. [A213723(1) = 2.]
There is no number that is 2 more than its binary weight [as A213723(2) = 0], therefore we just take 3 as the next term.
Following 3 we can choose either 4 or 5, but 4 is smaller, and is thus the next term of the sequence. [A213723(3) = 4.]
		

Crossrefs

Inverse permutation: A257683.
Cf. also A257676.

Extensions

Name slightly edited and links to A213723 in examples added by Antti Karttunen, May 04 2015

A218270 a(0)=1, a(1)=1, a(n) = a(n-2)^a(n-1)+1.

Original entry on oeis.org

1, 1, 2, 2, 5, 33, 116415321826934814453126
Offset: 0

Author

Nico Brown, Oct 24 2012

Keywords

Comments

The next term has roughly 1.7*10^23 digits.

Examples

			a(2) = a(0)^a(1)+1 = 1+1 = 2.
		

Crossrefs

Programs

  • Mathematica
    nxt[{a_,b_}]:={b,a^b+1}; Join[{1},NestList[nxt,{1,1},5][[All,2]]] (* Harvey P. Dale, Nov 25 2016 *)
  • Maxima
    a[0]:1$
    a[1]:1$
    a[n]:=a[n-2]^a[n-1]+1$
    makelist(a[n],n,1,6); /* Martin Ettl, Oct 29 2012 */

A218219 Define a(x,y) to be 1 if x is 0 or 1 and y*a(x-1,y)-a(x-2,y) otherwise. Then the n-th term of the sequence is a(n,n).

Original entry on oeis.org

1, 1, 1, 5, 41, 436, 5741, 90481, 1663585, 34988311, 828931049, 21851881930, 634556225161, 20129592507025, 692665874901013, 25699370092119569, 1022757988416562049, 43461563755791470416, 1964206882303435582865, 94076863910519354420761, 4760163616791818063701801
Offset: 0

Author

Nico Brown, Oct 23 2012

Keywords

Comments

The sequence grows about as fast as x!*e^x/p(x), where p(x) is a quadratic.

Examples

			For 3, by definition, a(0,3)=1 and a(1,3)=1, so a(2,3)=3*a(1,3)-a(0,3)=3-1=2 and a(3,3)=3*a(2,3)-a(1,3)=6-1=5, so the third element is 5
		

Crossrefs

Cf. A218220.