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-7 of 7 results.

A329603 a(n) = A005940(1+(1+(3*A156552(n)))) = (1/2) * A005940(1+(3*A156552(2*n))).

Original entry on oeis.org

2, 5, 8, 15, 18, 11, 50, 45, 20, 125, 98, 33, 242, 245, 32, 135, 338, 77, 578, 375, 72, 605, 722, 99, 42, 845, 60, 735, 1058, 17, 1682, 405, 200, 1445, 162, 231, 1922, 1805, 392, 1125, 2738, 1331, 3362, 1815, 44, 2645, 3698, 297, 110, 275, 968, 2535, 4418, 539, 450, 2205, 1352, 4205, 5618, 51, 6962, 4805, 500, 1215, 882, 1859, 7442, 4335, 2312
Offset: 1

Views

Author

Antti Karttunen, Nov 21 2019

Keywords

Comments

Function n -> 3n+1 (A016777) conjugated by A156552. - Antti Karttunen, Aug 21 2021

Crossrefs

Permutation of A329604.
A skewed diagonal of A341510.

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A156552(n) = { my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A329603(n) = ((1/2)*A005940(1+(3*A156552(2*n))));
    
  • Python
    from math import prod
    from itertools import accumulate
    from collections import Counter
    from sympy import prime, primepi, factorint
    def A329603(n): return prod(prime(len(a)+1)**b for a, b in Counter(accumulate(bin(1+3*sum((1<Chai Wah Wu, Mar 11 2023

Formula

a(n) = (1/2) * A005940(1+(3*A156552(2*n))).
From Antti Karttunen, Feb 14 2021: (Start)
A156552(2*a(n)) = 3*A156552(2*n) = 3*(1+2*A156552(n)) = 3 + 6*A156552(n).
a(n) = A341510(n,2n) = A005940(1+A156552(n)+A156552(2n)) = A005940(1+(1+(3*A156552(n)))).
a(n) = A005940(1+A016777(A156552(n))).
For all n >= 1, A329903(a(n)) = A332814(a(n)) = A332823(A332461(a(n))) = 1.
For all n >= 1, A341354(a(n)) > 0.
For all n >= 1, A000035(a(n)) = 1 - A000035(n). [Flips the parity of n]
(End)
a(n) = A332449(2*n)/2, a(n) = Sum_{d|n} A347117(d). - Antti Karttunen, Aug 21 2021

Extensions

New primary definition added by Antti Karttunen, Feb 14 2021

A341515 The Collatz or 3x+1 map (A006370) conjugated by unary-binary-encoding (A156552).

Original entry on oeis.org

1, 5, 2, 15, 3, 11, 5, 45, 4, 125, 7, 33, 11, 245, 6, 135, 13, 77, 17, 375, 10, 605, 19, 99, 9, 845, 8, 735, 23, 17, 29, 405, 14, 1445, 15, 231, 31, 1805, 22, 1125, 37, 1331, 41, 1815, 12, 2645, 43, 297, 25, 275, 26, 2535, 47, 539, 21, 2205, 34, 4205, 53, 51, 59, 4805, 20, 1215, 33, 1859, 61, 4335, 38, 3125, 67, 693
Offset: 1

Views

Author

Antti Karttunen, Feb 14 2021

Keywords

Comments

Collatz-conjecture can be formulated via this sequence by postulating that all iterations of a(n), starting from any n > 1, will eventually reach the cycle [2, 5, 3].

Crossrefs

Cf. A005940, A006370, A064989, A156552, A329603, A341510, A347115 (Möbius transform),
Sequences related to iterations of this sequence: A352890, A352891, A352892, A352893, A352894, A352896, A352897, A352898, A352899.
Cf. A341516 (a variant).

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A156552(n) = { my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A329603(n) = A005940(2+(3*A156552(n)));
    A341515(n) = if(n%2, A064989(n), A329603(n));

Formula

If n is odd, then a(n) = A064989(n), otherwise a(n) = A329603(n) = A341510(n,2*n).
a(n) = A005940(1+A006370(A156552(n))).

A341520 Square array A(n,k) = A156552(A005940(1+n)*A005940(1+k)), read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 3, 5, 5, 3, 4, 7, 6, 7, 4, 5, 9, 11, 11, 9, 5, 6, 11, 10, 15, 10, 11, 6, 7, 13, 13, 19, 19, 13, 13, 7, 8, 15, 14, 23, 12, 23, 14, 15, 8, 9, 17, 23, 27, 21, 21, 27, 23, 17, 9, 10, 19, 18, 31, 22, 27, 22, 31, 18, 19, 10, 11, 21, 21, 35, 39, 29, 29, 39, 35, 21, 21, 11, 12, 23, 22, 39, 20, 47, 30, 47, 20, 39, 22, 23, 12
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2021

Keywords

Comments

The indices run as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), etc. The array is symmetric.
This array defines a binary operation on the nonnegative integers that matches up the zeros in the binary representation of each operand (starting from the right, and including as many leading zeros as necessary) and concatenates the two (possibly null) strings of ones to the right of each matched pair of zeros. See the examples. - Peter Munn, Feb 14 2021.
As such it could be useful for implementing multiplication, say, in Turing machines, with a "tape-like" unary-binary encoding of the prime factorization of n (A156552). However, such representation is not very useful if addition or subtraction is also needed.

Examples

			The top left {0..15} X {0..16} corner of the array:
   0,  1,  2,  3,  4,  5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,
   1,  3,  5,  7,  9, 11,  13,  15,  17,  19,  21,  23,  25,  27,  29,  31,
   2,  5,  6, 11, 10, 13,  14,  23,  18,  21,  22,  27,  26,  29,  30,  47,
   3,  7, 11, 15, 19, 23,  27,  31,  35,  39,  43,  47,  51,  55,  59,  63,
   4,  9, 10, 19, 12, 21,  22,  39,  20,  25,  26,  43,  28,  45,  46,  79,
   5, 11, 13, 23, 21, 27,  29,  47,  37,  43,  45,  55,  53,  59,  61,  95,
   6, 13, 14, 27, 22, 29,  30,  55,  38,  45,  46,  59,  54,  61,  62, 111,
   7, 15, 23, 31, 39, 47,  55,  63,  71,  79,  87,  95, 103, 111, 119, 127,
   8, 17, 18, 35, 20, 37,  38,  71,  24,  41,  42,  75,  44,  77,  78, 143,
   9, 19, 21, 39, 25, 43,  45,  79,  41,  51,  53,  87,  57,  91,  93, 159,
  10, 21, 22, 43, 26, 45,  46,  87,  42,  53,  54,  91,  58,  93,  94, 175,
  11, 23, 27, 47, 43, 55,  59,  95,  75,  87,  91, 111, 107, 119, 123, 191,
  12, 25, 26, 51, 28, 53,  54, 103,  44,  57,  58, 107,  60, 109, 110, 207,
  13, 27, 29, 55, 45, 59,  61, 111,  77,  91,  93, 119, 109, 123, 125, 223,
  14, 29, 30, 59, 46, 61,  62, 119,  78,  93,  94, 123, 110, 125, 126, 239,
  15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 239, 255,
  16, 33, 34, 67, 36, 69,  70, 135,  40,  73,  74, 139,  76, 141, 142, 271,
...
From _Peter Munn_, Feb 24 2021: (Start)
We consider the case of n = 10, k = 41, following the procedure in the Feb 14 2021 comment.
First, write 10 and 41 in binary:
  10 = 1010_2
  41 = 101001_2
Add at least one leading zero to each number, equalizing number of zeros:
  0  0  1  0  1  0
  0  1  0  1  0  0  1
Align zeros, but separate ones:
  0     0  1     0  1  0
  |     |        |     |
  0  1  0     1  0     0  1
---------------------------
  0  1  0  1  1  0  1  0  1
Concatenating the ones, as shown above, we get 10110101_2 = 181.
So A(10, 41) = 181.
(End)
		

Crossrefs

Cf. A088698 (main diagonal).
Rows/columns 0-3: A001477, A005408, A341522, A004767. Row/column 7: A004771.
Cf. A341521 (the lower triangular section).

Programs

  • Mathematica
    Block[{nn = 12, a = {1}}, Do[AppendTo[a, If[EvenQ[i], Times @@ Map[Prime[PrimePi[#1] + 1]^#2 & @@ # &, FactorInteger[#]] &@ a[[(i/2) + 1]], 2 a[[((i - 1)/2) + 1]]]], {i, nn}]; Table[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]] &[a[[1 + n - k]]*a[[1 + k]] ], {n, 0, nn}, {k, n, 0, -1}]] // Flatten (* Michael De Vlieger, Feb 24 2021 *)
  • PARI
    up_to = 105;
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A341520sq(n,k) = A156552(A005940(1+n)*A005940(1+k));
    A341520list(up_to) = { my(v = vector(1+up_to), i=0); for(a=0,oo, for(col=0,a, i++; if(i > #v, return(v)); v[i] = A341520sq(col,(a-(col))))); (v); };
    v341520 = A341520list(up_to);
    A341520(n) = v341520[1+n];

Formula

A(x, y) = A156552(A005940(1+x) * A005940(1+y)).
For all n>=0, A(0, n) = A(n, 0) = n.
For all x>=0, y>=0, A(x, y) = A(y, x).
For all x, y, z >= 0, A(x, A(y, z)) = A(A(x, y), z).
From Antti Karttunen, Feb 27 2022: (Start)
For all x, y >= 0, A(x, y) = A(A351961(x,y), A351962(x,y)).
For x >= 0, y > 0, A(x, y) = A351960(x, A(x, A297164(y))).
(End)

A348041 Square array read by antidiagonals. A(n,k) is the nearest common ancestor of n and k in the Doudna tree (A005940).

Original entry on oeis.org

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

Views

Author

Antti Karttunen and Peter Munn, Sep 27 2021

Keywords

Comments

Array is symmetric and is read by antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ... .
Also the nearest common ancestor of n and k in the tree depicted in A163511 (the mirror image of the Doudna tree).
The first fork in the Doudna tree separates numbers divisible by the square of their largest prime factor (on one main branch) from other numbers greater than 2 (on the other main branch). If n and m are on different main branches then A(n, m) = 2.
In more general terms A(.,.) can be considered as a binary operation that evaluates certain differences between the prime factors of its operands. To start, compare the largest prime factor of each operand with the 2nd largest prime factor. As described above, 2 is the result if these 2 factors are the same in one operand, but are different in the other operand; otherwise 3 is the result if these 2 factors are consecutive primes in one operand, but are nonconsecutive primes in the other operand. Further cases are covered in the examples, but note it is the difference between the indices of the prime numbers that is significant.

Examples

			The top left 17x17 corner of the array:
  n/k |  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17
------+-------------------------------------------------------------
    1 |  1, 1, 1, 1, 1, 1, 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,
    2 |  1, 2, 2, 2, 2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,
    3 |  1, 2, 3, 2, 3, 3, 3, 2, 2,  3,  3,  3,  3,  3,  3,  2,  3,
    4 |  1, 2, 2, 4, 2, 2, 2, 4, 4,  2,  2,  2,  2,  2,  2,  4,  2,
    5 |  1, 2, 3, 2, 5, 3, 5, 2, 2,  5,  5,  3,  5,  5,  3,  2,  5,
    6 |  1, 2, 3, 2, 3, 6, 3, 2, 2,  3,  3,  6,  3,  3,  6,  2,  3,
    7 |  1, 2, 3, 2, 5, 3, 7, 2, 2,  5,  7,  3,  7,  7,  3,  2,  7,
    8 |  1, 2, 2, 4, 2, 2, 2, 8, 4,  2,  2,  2,  2,  2,  2,  8,  2,
    9 |  1, 2, 2, 4, 2, 2, 2, 4, 9,  2,  2,  2,  2,  2,  2,  4,  2,
   10 |  1, 2, 3, 2, 5, 3, 5, 2, 2, 10,  5,  3,  5,  5,  3,  2,  5,
   11 |  1, 2, 3, 2, 5, 3, 7, 2, 2,  5, 11,  3, 11,  7,  3,  2, 11,
   12 |  1, 2, 3, 2, 3, 6, 3, 2, 2,  3,  3, 12,  3,  3,  6,  2,  3,
   13 |  1, 2, 3, 2, 5, 3, 7, 2, 2,  5, 11,  3, 13,  7,  3,  2, 13,
   14 |  1, 2, 3, 2, 5, 3, 7, 2, 2,  5,  7,  3,  7, 14,  3,  2,  7,
   15 |  1, 2, 3, 2, 3, 6, 3, 2, 2,  3,  3,  6,  3,  3, 15,  2,  3,
   16 |  1, 2, 2, 4, 2, 2, 2, 8, 4,  2,  2,  2,  2,  2,  2, 16,  2,
   17 |  1, 2, 3, 2, 5, 3, 7, 2, 2,  5, 11,  3, 13,  7,  3,  2, 17,
.
The nearest common ancestor of 7 and 15 in the Doudna tree (see diagram in the links and A005940) is 3, thus A(7,15) = A(15,7) = 3.
The nearest common ancestor of 12 and 15 in the Doudna tree is 6, thus A(12,15) = A(15,12) = 6.
The nearest common ancestor of 4 and 27 is 4 because 27 is a descendant of 4 in the Doudna tree, thus A(4,27) = A(27,4) = 4.
Example without reference to the Doudna tree: (Start)
The method below works in general for A(.,.) considered as a binary operation, but we use A(20, 42) as our example.
(1) Write each operand as a product of primes in nondecreasing order, convert to a tuple of prime indices, decrement each index, take first differences, then reverse the order:
  20 = 2*2*5 = prime(1) * prime(1) * prime(3) -> (1,1,3) -> (0,0,2) -> (0,0,2) -> (2,0,0);
  42 = 2*3*7 = prime(1) * prime(2) * prime(4) -> (1,2,4) -> (0,1,3) -> (0,1,2) -> (2,1,0).
(2) Truncate each tuple after the first elements that differ between them (or at the length of the shorter tuple):
  (2,0,0) -> (2,0); (2,1,0) -> (2,1).
(3) Choose the lesser tuple: (2,0).
(4) Determine which number would generate this tuple by the process from step (1):
  10 = 2*5 = prime(1) * prime(3) -> (1,3) -> (0,2) -> (0,2) -> (2,0).
This gives A(20, 42) = 10.
(End)
		

Crossrefs

Cf. A000027 (main diagonal).
Cf. also A341510, A347380, A347381.

Programs

  • PARI
    up_to = 105;
    Abincompreflen(n, m) = { my(x=binary(n),y=binary(m),u=min(#x,#y)); for(i=1,u,if(x[i]!=y[i],return(i-1))); (u);};
    Abinprefix(n,k) = { my(digs=binary(n)); fromdigits(vector(k,i,digs[i]),2); };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = {my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A348040sq(x,y) = Abincompreflen(A156552(x), A156552(y));
    A348041sq(x,y) = A005940(1+Abinprefix(A156552(x),A348040sq(x,y)));
    A348041list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A348041sq(col,(a-(col-1))))); (v); };
    v348041 = A348041list(up_to);
    A348041(n) = v348041[n];
    
  • PARI
    \\ A348041sq can be defined also as:
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A348041sq(x,y) = if(1==x||1==y,1, my(lista=List([]), i, k=x, stemvec, h=y); while(k>1, listput(lista,k); k = A252463(k)); stemvec = Vecrev(Vec(lista)); while(1, if((i=vecsearch(stemvec,h))>0, return(stemvec[i])); h = A252463(h)));

Formula

A(n, 1) = A(1, n) = 1; otherwise if A241917(n) <> A241917(m) then A(n, m) = A000040(1 + min(A241917(2*n), A241917(2*m))); otherwise A(n, m) = x * A000040(A061395(x)+A241917(n)), where x = A(A052126(n), A052126(m)).
A(i, j) = A(j, i).
A(n, n) = n.
A(2, n) = 2 for all n > 1.
A(p, q) = min(p, q) for any primes p and q.
A(A070003(n), A102750(m)) = 2.
A(u^2, v^2) = A(u, v)^2.
A(4k+2, 6k+3) = A064989(2k+1) for all k >= 1.

A297165 Permutation of natural numbers: a(n) = A005940(2+A156552(n)), a(0) = 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 10, 7, 8, 15, 14, 25, 22, 21, 12, 11, 26, 27, 34, 35, 20, 33, 38, 49, 18, 39, 16, 55, 46, 45, 58, 13, 28, 51, 30, 125, 62, 57, 44, 77, 74, 63, 82, 65, 24, 69, 86, 121, 50, 75, 52, 85, 94, 81, 42, 91, 68, 87, 106, 175, 118, 93, 40, 17, 66, 99, 122, 95, 76, 105, 134, 343, 142, 111, 36, 115, 70, 117, 146, 143, 32
Offset: 0

Views

Author

Antti Karttunen, Jan 05 2018

Keywords

Comments

Note the indexing: although the domain starts from 0, the range excludes zero.

Crossrefs

Inverse: A297166.
Cf. also A297163.
Row/column 2 of A341510 (from the term 2 onward).

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A297165(n) = if(!n,1,A005940(2+A156552(n))); \\ Antti Karttunen, Feb 15 2021
    
  • Scheme
    (define (A297165 n) (if (zero? n) 1 (A005940 (+ 2 (A156552 n)))))

Formula

a(0) = 1; for n > 1, a(n) = A005940(2+A156552(n)).

A351960 Square array A(n,k) = A156552(A005940(1+n) + A005940(1+k)), read by antidiagonals.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 9, 7, 7, 7, 7, 7, 9, 6, 16, 6, 6, 6, 6, 16, 6, 7, 9, 11, 9, 9, 9, 11, 9, 7, 16, 6, 16, 32, 16, 16, 32, 16, 6, 16, 15, 11, 9, 11, 17, 11, 17, 11, 9, 11, 15, 32, 64, 32, 16, 32, 10, 10, 32, 16, 32, 64, 32, 65, 17, 13, 17, 11, 17, 13, 17, 11, 17, 13, 17, 65
Offset: 0

Views

Author

Antti Karttunen, Feb 26 2022

Keywords

Comments

The indices run as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), etc. The array is symmetric.

Examples

			The top left corner of the array:
     |n= 0    1    2     3    4     5    6    7    8     9    10    11    12
-----+--------------------------------------------------------------------------
k= 0 |   1,   2,   3,    4,   5,    8,   9,   6,   7,   16,   15,   32,   65,
   1 |   2,   3,   4,    5,   8,    7,  16,   9,   6,   11,   64,   17,   14,
   2 |   3,   4,   5,    8,   7,    6,  11,  16,   9,   32,   13,   10,   35,
   3 |   4,   5,   8,    7,   6,    9,  32,  11,  16,   17,  128,   15,  512,
   4 |   5,   8,   7,    6,   9,   16,  17,  32,  11,   10,   19,   64,   21,
   5 |   8,   7,   6,    9,  16,   11,  10,  17,  32,   15,   18,   13, 1024,
   6 |   9,  16,  11,   32,  17,   10,  13,  64,  15,  128,   23,   18,  129,
   7 |   6,   9,  16,   11,  32,   17,  64,  15,  10,   13,  256,   19,   34,
   8 |   7,   6,   9,   16,  11,   32,  15,  10,  17,   64,   33,  128,   31,
   9 |  16,  11,  32,   17,  10,   15, 128,  13,  64,   19,   12,   33,   20,
  10 |  15,  64,  13,  128,  19,   18,  23, 256,  33,   12,   21,   14,   39,
  11 |  32,  17,  10,   15,  64,   13,  18,  19, 128,   33,   14,   23, 2048,
  12 |  65,  14,  35,  512,  21, 1024, 129,  34,  31,   20,   39, 2048,   25,
  13 | 128,  19,  18,   33, 256,   23,  14,  65,  12,   35,   34,   21, 8192,
  14 |  35, 512,  21, 1024,  31,   34,  27,  20, 129, 2048,   37,   66,  131,
  15 |  64,  13, 128,   19,  18,   33,  12,  23, 256,   65, 1024,   35, 4096,
  16 |  11,  32,  17,   10,  15,   64,  19, 128,  13,   18,   65,  256,   27,
		

Crossrefs

Cf. A005408 (main diagonal), A297163 (row/column 0).

Programs

  • PARI
    up_to = 104;
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A351960sq(n,k) = A156552(A005940(1+n)+A005940(1+k));
    A351960list(up_to) = { my(v = vector(1+up_to), i=0); for(a=0,oo, for(col=0,a, i++; if(i > #v, return(v)); v[i] = A351960sq(col,(a-(col))))); (v); };
    v351960 = A351960list(up_to);
    A351960(n) = v351960[1+n];

A341511 Triangular array T(n,k) = A005940(1+A156552(n)+A156552(k)), read by rows, with n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 4, 5, 6, 9, 5, 6, 9, 8, 7, 6, 9, 8, 7, 10, 15, 7, 10, 15, 12, 25, 18, 11, 8, 7, 10, 15, 12, 25, 16, 27, 9, 8, 7, 10, 15, 12, 27, 18, 25, 10, 15, 12, 25, 18, 27, 14, 11, 16, 21, 11, 14, 21, 20, 35, 30, 49, 24, 45, 50, 13, 12, 25, 18, 27, 16, 11, 20, 21, 14, 35, 36, 45, 13, 22, 33, 28, 55, 42, 77, 40, 63, 70, 121, 60, 17
Offset: 1

Views

Author

Antti Karttunen, Feb 15 2021

Keywords

Comments

A341510 is the main entry for this dyadic function. See comments there.

Examples

			The triangle begins as:
  1,
  2,  3,
  3,  4,  5,
  4,  5,  6,  9,
  5,  6,  9,  8,  7,
  6,  9,  8,  7, 10, 15,
  7, 10, 15, 12, 25, 18, 11,
  8,  7, 10, 15, 12, 25, 16, 27,
  9,  8,  7, 10, 15, 12, 27, 18, 25,
etc.
		

Crossrefs

The lower triangular region of A341510 read by rows.
Cf. A000027 (the left edge), A003961 (the right edge).

Programs

  • PARI
    up_to = 105;
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A341510sq(n,k) = A005940(1+A156552(n)+A156552(k));
    A341511list(up_to) = { my(v = vector(up_to), i=0); for(n=1,oo, for(k=1,n, i++; if(i > #v, return(v)); v[i] = A341510sq(n,k))); (v); };
    v341511 = A341511list(up_to);
    A341511(n) = v341511[n];

Formula

T(n, k) = A341510(n, k).
Showing 1-7 of 7 results.