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: Flávio V. Fernandes

Flávio V. Fernandes's wiki page.

Flávio V. Fernandes has authored 4 sequences.

A351123 Irregular triangle read by rows: row n lists the partial sums of the number of divisions by 2 after each tripling step in the Collatz trajectory of 2n+1.

Original entry on oeis.org

1, 5, 4, 1, 2, 4, 7, 11, 2, 3, 4, 6, 9, 13, 1, 3, 6, 10, 3, 7, 1, 2, 3, 8, 12, 2, 5, 9, 1, 4, 5, 7, 10, 14, 6, 1, 2, 7, 11, 2, 3, 6, 7, 9, 12, 16, 1, 3, 4, 5, 6, 7, 9, 11, 12, 14, 15, 16, 18, 19, 20, 21, 23, 26, 27, 28, 30, 31, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 48, 50, 52, 56, 59, 60, 61, 66, 70
Offset: 1

Author

Flávio V. Fernandes, Feb 01 2022

Keywords

Comments

The terms in row n are T(n,0), T(n,1), ..., T(n, A258145(n)-2), and are the partial sums of the terms in row n of A351122.
In each row n, the terms also satisfy the equation 3* (3* (3* (3* ... (3* (2n+1) +1) + 2^T(n,0)) + 2^T(n,1)) + 2^T(n,2)) + ... = 2^T(n, A258145(n)-2); e.g., for n=4, and A258145(4)-2=5: 3* (3* (3* (3* (3* (3*9+1) +2^2) +2^3) +2^4) +2^6) +2^9 = 2^13.
For row n, the right-hand side of the equation above is 2^A166549(n+1). E.g., for the above example (n=4), the right-hand side is 2^A166549(4+1) = 2^13.

Examples

			Triangle starts at T(1,0):
n\k   0   1   2   3   4   5   6   7   8   9   10 ...
1:    1   5
2:    4
3:    1   2   4   7  11
4:    2   3   4   6   9  13
5:    1   3   6  10
6:    3   7
7:    1   2   3   8   12
8:    2   5   9
...
E.g., row 3 of A351122 is [1, 1, 2, 3, 4]; its partial sums are [1, 2, 4, 7, 11].
		

Programs

  • PARI
    orow(n) = my(m=2*n+1, list=List()); while (m != 1, if (m%2, m = 3*m+1, my(nb = valuation(m,2)); m/=2^nb; listput(list, nb));); Vec(list); \\ A351122
    row(n) = my(v = orow(n)); vector(#v, k, sum(i=1, k, v[i])); \\ Michel Marcus, Jul 18 2022

Extensions

Data corrected by Mohsen Maesumi, Jul 18 2022
Last row completed by Michel Marcus, Jul 18 2022

A351122 Irregular triangle read by rows in which row n lists the number of divisions by 2 after tripling steps in the Collatz 3x+1 trajectory of 2n+1 until it reaches 1.

Original entry on oeis.org

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

Author

Flávio V. Fernandes, Feb 01 2022

Keywords

Examples

			Triangle starts at T(1,0):
   n\k   0   1   2   3   4   5   6   7   8 ...
   1:    1   4
   2:    4
   3:    1   1   2   3   4
   4:    2   1   1   2   3   4
   5:    1   2   3   4
   6:    3   4
   7:    1   1   1   5   4
   8:    2   3   4
   9:    1   3   1   2   3   4
  10:    6
  11:    1   1   5   4
  12:    2   1   3   1   2   3   4
  13:    1   2   1   1   1   1   2   2   1   2   1   1   2  ... (see A372362)
  ...
For n=6, the trajectory of 2*n+1 = 13 is as follows. The tripling steps ("=>") are followed by runs of 3 and then 4 halvings ("->"), so row n=6 is 3, 4.
  13  =>  40 -> 20 -> 10 -> 5  =>  16 -> 8 -> 4 -> 2 -> 1
    triple   \------------/   triple  \---------------/
               3 halvings                4 halvings
Runs of halvings are divisions by 2^T(n,k). Row n=11 is 1, 1, 5, 4 and its steps starting from 2*n+1 = 23 reach 1 by a nested expression
  (((((((23*3+1)/2^1)*3+1)/2^1)*3+1)/2^5)*3+1)/2^4 = 1.
		

Crossrefs

Cf. A075680 (row lengths), A166549 (row sums), A351123 (row partial sums).
Cf. A256598.
Cf. A020988 (where row is [2*n]).
Cf. A198584 (where row length is 2), A228871 (where row is [1, x]).
Cf. A372362 (row 13, the first 41 terms).

Programs

  • PARI
    row(n) = my(m=2*n+1, list=List()); while (m != 1, if (m%2, m = 3*m+1, my(nb = valuation(m,2)); m/=2^nb; listput(list, nb));); Vec(list); \\ Michel Marcus, Jul 18 2022

Formula

T(n,k) = log_2( (3*A256598(n,k)+1) / A256598(n,k+1) ).

Extensions

Corrected by Michel Marcus, Jul 18 2022

A350179 Primes of the form ( A349309(n) + 1 ) ^ (1/3).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 23, 29, 31, 43, 47, 53, 59, 61, 67, 71, 79, 83, 101, 103, 107, 131, 139, 149, 151, 157, 167, 173, 179, 191, 197, 211, 223, 227, 229, 239, 263, 269, 277, 283, 293, 311, 317, 331, 347, 349, 359, 367, 373, 383, 389, 419, 421, 431, 439, 443, 461, 463, 467
Offset: 1

Author

Flávio V. Fernandes, Dec 23 2021

Keywords

Comments

Equivalently, primes p such that A051903(p^3-1) < 3. - Amiram Eldar, Dec 26 2021

Examples

			5 is a term since (A349309(3) + 1) ^ (1/3) = 125 ^ (1/3) = 5.
		

Crossrefs

Programs

  • Maple
    filter:= n -> isprime(n) and max(map(t -> t[2],ifactors(n^3-1)[2]))<3:
    select(filter, [2,seq(i,i=3..1000,2)]); # Robert Israel, Dec 26 2021
  • Mathematica
    q[p_] := PrimeQ[p] && AllTrue[FactorInteger[p^3 - 1][[;; , 2]], # < 3 &]; Select[Range[500], q] (* Amiram Eldar, Dec 26 2021 *)
  • PARI
    isok(p) = isprime(p) && (vecmax(factor(p^3-1)[,2]) < 3); \\ Michel Marcus, Jul 18 2022
  • Python
    from itertools import count, islice
    from sympy import prime, factorint
    def A350179_gen(): return (p for p in (prime(n) for n in count(1)) if max(factorint(p**3-1).values()) < 3)
    A350179_list = list(islice(A350179_gen(),30)) # Chai Wah Wu, Jan 24 2022
    

Extensions

More terms from Michel Marcus, Dec 25 2021

A347977 Primes of the form 2^p * 3^q * 5^r * 7^s - 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 47, 53, 59, 71, 79, 83, 89, 97, 107, 127, 139, 149, 167, 179, 191, 199, 223, 239, 251, 269, 293, 349, 359, 383, 419, 431, 449, 479, 499, 503, 587, 599, 647, 719, 809, 839, 863, 881, 971, 1049, 1151, 1249, 1259, 1279, 1399, 1439, 1499, 1511, 1567, 1619, 1889
Offset: 1

Author

Flávio V. Fernandes, Sep 21 2021

Keywords

Comments

Restricting to r = s = 0 gives A005105; s = 0 gives A293194.
Primes of the form A002473(k) - 1.

Examples

			251 = 2^2 * 3^2 * 5^0 * 7^1 - 1 and 839 = 2^3 * 3^1 * 5^1 * 7^1 - 1 are terms.
		

Crossrefs

Programs

  • Mathematica
    With[{n = 2000}, Sort@ Select[Flatten@ Table[2^p * 3^q * 5^r * 7^s - 1, {p, 0, Log[2, n]}, {q, 0, Log[3, n/(2^p)]}, {r, 0, Log[5, n/(2^p * 3^q)]}, {s, 0, Log[7, n/(2^p * 3^q * 5^r)]}], PrimeQ]] (* Amiram Eldar, Sep 25 2021 after Michael De Vlieger at A293194 *)
  • PARI
    isok(p) = isprime(p) && (vecmax(factor(p+1)[,1]) < 11); \\ Michel Marcus, Nov 10 2021
    
  • PARI
    upto(limit)={my(P=[2,3,5,7]); local(L=List()); my(recurse(k,t) = if(t<=limit+1, if(k>#P, if(isprime(t-1), listput(L,t-1)), my(b=P[k]); for(e=0, logint(limit+1,b), self()(k+1, t*b^e))))); recurse(1, 1); vecsort(Vec(L))} \\ Andrew Howroyd, Nov 20 2021
    
  • Python
    from itertools import count, islice
    from sympy import integer_log, isprime
    def A347977_gen(): # generator of terms
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c = x
            for i in range(integer_log(x,7)[0]+1):
                for j in range(integer_log(m:=x//7**i,5)[0]+1):
                    for k in range(integer_log(r:=m//5**j,3)[0]+1):
                        c -= (r//3**k).bit_length()
            return c
        yield from filter(isprime,(bisection(lambda k:n+f(k),n,n)-1 for n in count(1)))
    A347977_list = list(islice(A347977_gen(),30)) # Chai Wah Wu, Mar 31 2025