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

A104244 Suppose m = Product_{i=1..k} p_i^e_i, where p_i is the i-th prime number and each e_i is a nonnegative integer. Then we can define P_m(x) = Sum_{i=1..k} e_i*x^(i-1). The sequence is the square array A(n,m) = P_m(n) read by descending antidiagonals.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 1, 2, 3, 1, 0, 2, 4, 2, 4, 1, 0, 1, 3, 9, 2, 5, 1, 0, 3, 8, 4, 16, 2, 6, 1, 0, 2, 3, 27, 5, 25, 2, 7, 1, 0, 2, 4, 3, 64, 6, 36, 2, 8, 1, 0, 1, 5, 6, 3, 125, 7, 49, 2, 9, 1, 0, 3, 16, 10, 8, 3, 216, 8, 64, 2, 10, 1, 0, 1, 4, 81, 17, 10, 3, 343, 9, 81, 2, 11, 1, 0, 2, 32, 5
Offset: 1

Views

Author

Olaf Voß, Feb 26 2005

Keywords

Comments

From Antti Karttunen, Jul 29 2015: (Start)
The square array A(row,col) is read by downwards antidiagonals as: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
A(n,m) (entry at row=n, column=m) gives the evaluation at x=n of the polynomial (with nonnegative integer coefficients) bijectively encoded in the prime factorization of m. See A206284, A206296 for the details of that encoding. (The roles of variables n and m were accidentally swapped in this description, corrected by Antti Karttunen, Oct 30 2016)
(End)
Each row is a completely additive sequence, row n mapping prime(m) to n^(m-1). - Peter Munn, Apr 22 2022

Examples

			a(13) = 3 because 3 = p_1^0 * p_2^1 * p_3^0 * ..., so P_3(x) = 0*x^(1-1) + 1*x^(2-1) + 0*x^(3-1) + ... = x. Hence a(13) = A(3,3) = P_3(3) = 3. [Elaborated by _Peter Munn_, Aug 13 2022]
The top left corner of the array:
0, 1,  1, 2,   1,  2,   1,  3,  2,   2,     1,  3,      1,    2,   2, 4
0, 1,  2, 2,   4,  3,   8,  3,  4,   5,    16,  4,     32,    9,   6, 4
0, 1,  3, 2,   9,  4,  27,  3,  6,  10,    81,  5,    243,   28,  12, 4
0, 1,  4, 2,  16,  5,  64,  3,  8,  17,   256,  6,   1024,   65,  20, 4
0, 1,  5, 2,  25,  6,  125, 3, 10,  26,   625,  7,   3125,  126,  30, 4
0, 1,  6, 2,  36,  7,  216, 3, 12,  37,  1296,  8,   7776,  217,  42, 4
0, 1,  7, 2,  49,  8,  343, 3, 14,  50,  2401,  9,  16807,  344,  56, 4
0, 1,  8, 2,  64,  9,  512, 3, 16,  65,  4096, 10,  32768,  513,  72, 4
0, 1,  9, 2,  81, 10,  729, 3, 18,  82,  6561, 11,  59049,  730,  90, 4
0, 1, 10, 2, 100, 11, 1000, 3, 20, 101, 10000, 12, 100000, 1001, 110, 4
...
		

Crossrefs

Cf. A000720.
Transpose: A104245.
Main diagonal: A090883.
Row 1: A001222, row 2: A048675, row 3: A090880, row 4: A090881, row 5: A090882, row 10: A054841; and, in the extrapolated table, row 0: A007814, row -1: A195017.
Other completely additive sequences with prime(k) mapped to a function of k include k: A056239, k-1: A318995, k+1: A318994, k^2: A289506, 2^k-1: A293447, k!: A276075, F(k-1): A265753, F(k-2): A265752.
For completely additive sequences with primes p mapped to a function of p, see A001414.
For completely additive sequences where some primes are mapped to 1, the rest to 0 (notably, some ruler functions) see the cross-references in A249344.
For completely additive sequences, s, with primes p mapped to a function of s(p-1) and maybe s(p+1), see A352957.
See the formula section for the relationship to A073133, A206296.
See the comments for the relevance of A206284.
A297845 represents multiplication of the relevant polynomials.
Cf. A090884, A248663, A265398, A265399 for other related sequences.
A167219 lists columns that contain their own column number.

Formula

A(n,A206296(k)) = A073133(n,k). [This formula demonstrates how this array can be used with appropriately encoded polynomials. Note that A073133 reads its antidiagonals by ascending order, while here the order is opposite.] - Antti Karttunen, Oct 30 2016
From Peter Munn, Apr 05 2021: (Start)
The sequence is defined by the following identities:
A(n, 3) = n;
A(n, m*k) = A(n, m) + A(n, k);
A(n, A297845(m, k)) = A(n, m) * A(n, k).
(End)

Extensions

Starting offset changed from 0 to 1 by Antti Karttunen, Jul 29 2015
Name edited (and aligned with rest of sequence) by Peter Munn, Apr 23 2022

A344443 Completely additive with a(2)=5; for odd prime p, a(p) = ceiling((a(p-1) + a(p+1))/2).

Original entry on oeis.org

0, 5, 8, 10, 12, 13, 14, 15, 16, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 30, 29, 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31
Offset: 1

Views

Author

Peter Munn, May 19 2021

Keywords

Comments

Monotonic until a(55) = 30 > 29 = a(56).
The length of a monotonic completely additive sequence using positive integers is limited by the size of the initial terms, and this constraint is related to the conflicts inherent in specifying musical scales. In either case, the route to a good compromise solution that avoids complexity can be seen as a search for rational approximations to ratios between logarithms of the first few prime numbers.
Here a(i)/a(j) is the intended approximation to log(i)/log(j), so by starting with a(2) = 5 we open the door to using 8/5 as an approximation to log(3)/log(2) = 1.58496... . This approximation underlies simple musical scales that divide an octave into 5, where a note of twice the frequency is 5 tones higher and a note of about 3 times the frequency is 8 tones higher. The most commonly used more complex musical scales divide an octave into 12, equivalent to starting a sequence like this with a(2) = 12 (see A344444).

Examples

			a(4) = a(2*2) = a(2) + a(2) from the definition of completely additive. So a(4) = 5 + 5 = 10.
3 is an odd prime number, so a(3) = ceiling((a(3-1) + a(3+1))/2). Using the values a(2) = 5 and a(4) = 10 that we already know, we get a(3) = ceiling((5 + 10)/2) = ceiling(7.5) = 8.
The sequence is defined as completely additive, so a(1) = 0, the identity element for addition. (To see this, note that "completely additive" implies a(2) = a(2*1) = a(2)+a(1), and solve the equation for a(1).)
		

Crossrefs

Equivalent sequence with a(2)=12, a(3)=19: A344444.
The first 11 terms match row 11 of A352957.
For other completely additive sequences see the references in A104244.

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = Plus @@ ((Last[#] * If[First[#] == 2, 5, Ceiling[(a[First[#] - 1] + a[First[#] + 1])/2]]) & /@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Jun 27 2021 *)
  • PARI
    A344443(n) = if(1==n,0, my(f=factor(n)); sum(k=1,#f~,f[k,2]*if(2==f[k,1],5,ceil((1/2)*(A344443(f[k,1]-1)+A344443(f[k,1]+1)))))); \\ Antti Karttunen, May 19 2021

Formula

a(n*k) = a(n) + a(k).

A344444 Completely additive with a(2) = 12, a(3) = 19; for prime p > 3, a(p) = ceiling((a(p-1) + a(p+1))/2).

Original entry on oeis.org

0, 12, 19, 24, 28, 31, 34, 36, 38, 40, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 55, 56, 57, 57, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, 66, 67, 67, 67, 68, 68, 68, 69, 69, 69, 70, 70, 70, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 74, 74
Offset: 1

Views

Author

Peter Munn, May 20 2021

Keywords

Comments

Monotonic until a(143) = 87 > 86 = a(144).
The only infinite monotonic completely additive integer sequence is the all 0's sequence (cf. A000004). The challenge taken up here is to specify one that is monotonic for a modestly long number of terms, using a comparatively short prescriptive definition.
To start we specify values for a(2) and a(3) so that a(3)/a(2) approximates log(3)/log(2). 19/12 is a good approximation relative to the size of denominator. This reflects 2^19 = 524288 having a similar magnitude to 3^12 = 531441. Equivalently, we can say 3 is approximately the 19th power of the 12th root of 2. This approximation is used to construct musical scales. (See the Enevoldsen link, also A143800.) There is no better approximation with a denominator smaller than 29. [Revised by Peter Munn, Jun 14 2022]
To find a good specification to use for a(p) for larger primes, p, we are guided by knowing that if 2*a(n) < a(n-1) + a(n+1) then a completely additive sequence is not monotonic after a(n^2-1) because a(n^2) < a((n-1)*(n+1)) = a(n^2-1). Considering n = p, we see we want a(p) >= (a(p-1) + a(p+1))/2; but the same consideration for n = p-1 shows we don't want a(p) larger than necessary. These considerations lead towards the choice of "a(p) = ceiling((a(p-1) + a(p+1))/2)" for use in the definition.

Examples

			a(4) = a(2*2) = a(2) + a(2) from the definition of completely additive. So a(4) = 12 + 12 = 24. Similarly, a(6) = a(2*3) = a(2) + a(3) = 12 + 19 = 31.
5 is a prime number greater than 3, so a(5) = ceiling((a(5-1) + a(5+1))/2). Using the values a(4) = 24 and a(6) = 31 that we calculated earlier, we get a(5) = ceiling((24 + 31)/2) = ceiling(27.5) = 28.
The sequence is defined as completely additive, so a(1) = 0, the identity element for addition. (To see this, note that "completely additive" implies a(2) = a(2*1) = a(2)+a(1), and solve the equation for a(1).)
		

Crossrefs

Equivalent sequence with a(2)=5, a(3)=8: A344443.
First 10 terms match A143800.
Cf. row 23 of A352957.
For other completely additive sequences see the references in A104244.

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = Plus @@ ((Last[#] * Which[First[#] == 2, 12, First[#] == 3, 19, First[#] > 3, Ceiling[(a[First[#] - 1] + a[First[#] + 1])/2]]) & /@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Jun 27 2021 *)

Formula

a(n*k) = a(n) + a(k).
Showing 1-3 of 3 results.