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.

A339133 a(n) = A339107(n)*A339107(n+1)/(A339107(n)+A339107(n+1)).

Original entry on oeis.org

2, 4, 8, 6, 7, 24, 14, 12, 20, 21, 10, 6, 8, 24, 15, 16, 30, 12, 14, 48, 12, 10, 28, 60, 56, 45, 8, 6, 12, 20, 30, 54, 60, 36, 18, 24, 120, 108, 80, 90, 96, 60, 24, 28, 96, 72, 42, 54, 126, 108, 140, 126, 110, 84, 33, 28, 66, 21, 18, 66, 90, 66, 85, 132, 51, 52, 204, 51, 36, 78, 72, 40, 52, 60, 26
Offset: 1

Views

Author

Scott R. Shannon, Nov 24 2020

Keywords

Comments

This is the ratio of the multiplication and addition of successive terms in A339107. See that sequence for further details.

Examples

			a(1) = 2 as A339107(1) = 3 and A339107(2) = 6, and 3*6/(3+6) = 2.
		

Crossrefs

A339144 a(n) is the smallest positive integer such that n*a(n) contains n+a(n) as a substring. If no such number exists then a(n) = -1.

Original entry on oeis.org

-1, 2, -1, 68, -1, -1, -1, 44, -1, 890, 110, 60, 44, 35, 30, 27, 25, 23, 22, 20, 929, 19, 18, 88, 17, -1, 16, 16, 68, 15, 15, 60, 58, 56, 14, 14, 14, 371, 48, 360, 336, 562, 9104, 8, 13, 13, 283, 39, 269, 450, 37, 452, 245, 18, 679, 34, 225, 33, 2053, 12, 12, 12, 12, 12, 30, 369, 889, 4, 16961
Offset: 1

Views

Author

Scott R. Shannon, Nov 25 2020

Keywords

Comments

For n = 1, 3, 5, 6, 7, 9, 26 no value has been found for which n*a(n) contains n + a(n) as a substring (obviously true for n = 1) for a(n) up to 5x10^10. It is likely, although unproven, that this is the complete list of values for which a(n) = -1.
The sequence values display erratic behavior. Most of the term values appear random but there are ranges of n values with the same value. The largest such range for the first one million terms is a(501000) to a(501499), 500 terms, all of which have a(n) = 1002. Patterns also appear for n value corresponding to multiples of powers-of-ten. For example if n=10^k then a(n) = 89*10^k. The largest value in the first one million terms is a(554635) = 879948670.

Examples

			a(2) = 2 as 2*2 = 4 which contains 2 + 2 = 4 as a substring.
a(4) = 68 as 4*68 = 272 which contains 4+68 = 72 as a substring.
a(69) = 16961 as 69*16961 = 1170309 which contains 69+16961 = 17030 as a substring.
a(501000) = 1002 as 501000*1002 = 502002000 which contains 501000+1002 = 502002 as a substring. This is the first of 500 consecutive terms with a(n) = 1002.
a(554635) = 879948670 as 554635*879948670 = 488050330585450 which contain 554635+879948670 = 880503305 as a substring. This is the largest value of a(n) for the first one million terms.
		

Crossrefs

Programs

  • PARI
    isok(n, k) = #strsplit(Str(n*k), Str(n+k)) > 1;
    a(n) = {if (vecsearch([1, 3, 5, 6, 7, 9, 26], n), return (-1)); my(k=1); while (! isok(k, n), k++); k;} \\ Michel Marcus, Dec 02 2020 and Jan 23 2021

A339403 a(n) is the smallest positive integer such that n*a(n) contains the string n+a(n) in reverse as a substring. If no such number exists then a(n) = -1.

Original entry on oeis.org

0, -1, 2, 24, 37, 26, 34, 35, 57, 9, -1, 12, 11, 45, 193, 228, 28, 51, 23, 44, 841, 11, 27, 18, 3, 626, 5, 22, 16, 46716, 56, 41, 33, 32, 6, 7, 21, 4, 3, 24, 592, 31, 7, 619, 19, 13, 38, 2, 117, 5, 463, 17, 34, 308, 33, 36, 30, 8, 31, 4, 23, 21, 648, 124, 921, 903, 386, 395, 4, 334, 755, 31, 563
Offset: 0

Views

Author

Scott R. Shannon, Dec 03 2020

Keywords

Comments

This is a variation of A339144 where, instead of the n*a(n) containing n+a(n) as a substring, it contains the reverse of the string n+a(n), including any leading zeros.
Based on a search limit of 5x10^9 up to n = 100000 the values of n for which no a(n) is found are n = 10^k, with k>=0, and 17500. A test of 175000 and 1750000 also found no a(n) indicating that all values of the form 17500*10^k may have no term for a(n).
It is found that when n = 200*10^k, with k>=0, the corresponding value for a(n) is significantly larger than neighboring terms. As an example a(20000) = 666843331, which is the largest term up to n = 100000.
Unlike A339144, which contains multiple consecutive terms with the same value of a(n), in this sequence the largest consecutive run of the same a(n) in the first 100000 terms is only two. The first term of these pairs occurs at n = 110, 121, 2717, 4368, 7916, 10100, 11211, 13231, 17271, 44573, 63529.

Examples

			a(3) = 24 as 3*24 = 72 which contains reverse(3+24) = reverse(27) = 72 as a substring.
a(6) = 34 as 6*34 = 204 which contains reverse(6+34) = reverse(40) = 04 as a substring. Note the leading zero is included.
a(29) = 46716 as 29*46716 = 1354764 which contains reverse(29+4671) = reverse(46745) = 54764 as a substring.
a(110) = 11 as 110*11 = 1210 which contains reverse(110+11) = reverse(121) = 121 as a substring. This is the first of two consecutive terms with a(n) = 11.
a(20000) = 666843331 as 20000*666843331 = 13336866620000 which contains reverse(20000+666843331) = reverse(666863331) = 133368666 as a substring. This is the largest value in the first 100000 terms.
		

Crossrefs

Programs

  • PARI
    isok(n, k) = #strsplit(Str(n*k), concat(Vecrev(Str(n+k)))) > 1;
    ispt(n) = my(t); ispower(n,,&t) && (t==10);
    a(n) = {if ((n==1) || (n==10) || ispt(n), return (-1)); my(k=0); while (! isok(n, k), k++); k;} \\ Michel Marcus, Jan 22 2021
Showing 1-3 of 3 results.