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

A338166 Terms of A338039 that are repeated concatenations of smaller integers.

Original entry on oeis.org

1818, 8181, 181818, 198198, 405405, 484848, 504504, 565656, 576576, 656565, 675675, 818181, 848484, 891891, 11311131, 13041304, 13111311, 18181818, 19981998, 22622262, 26222622, 33933393, 39333933, 40314031, 41544154, 45144514, 46364636, 63646364, 81818181, 87498749, 89918991, 94789478
Offset: 1

Views

Author

Michel Marcus, Oct 14 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{f}, f[1] = 0; f[n_] := Plus @@ #[[All, 1]] + Plus @@ Select[#[[All, -1]], # > 1 &] &@ FactorInteger[n]; Select[Union@ Flatten@ Table[Union@ Flatten@ Map[Function[k, Map[FromDigits[Join @@ ConstantArray[IntegerDigits[#], n/k]] &, Range[10^(k - 1), 10^k - 1]]], Most@ Divisors[n]], {n, 3, 8}], And[Mod[#1, 10] != 0, #2 != #1, f[#1] == f[#2]] & @@ {#, IntegerReverse[#]} &] ] (* Michael De Vlieger, May 27 2021, after Amiram Eldar at A338039 *)
  • PARI
    f(n) = my(f=factor(n)); vecsum(f[,1]) + sum(k=1, #f~, if (f[k,2]!=1, f[k,2])); \\ A338038
    isok(m) = my(r=fromdigits(Vecrev(digits(m)))); if ((r != m) && (f(r) == f(m)), return(m));
    listc(c) = {my(list = List()); fordiv(c, d, if ((d != 1) && (d != c), for(k=10^(d-1), 10^d, if (k % 10, my(sk = Str(k), skk = sk); for (j=1, c/d-1, sk = concat(sk, skk)); if (isok(eval(sk)), listput(list, eval(sk))););););); list;}
    lista(nn) = {my(list = List()); forcomposite(c=1, nn, my(clist = Vec(listc(c))); for (k=1, #clist, listput(list, clist[k]));); vecsort(Vec(list),,8);}
    lista(8) \\ to get terms up to 8 digits

A338038 a(n) is the sum of the primes and exponents in the prime factorization of n, but ignoring 1-exponents.

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 7, 5, 5, 7, 11, 7, 13, 9, 8, 6, 17, 7, 19, 9, 10, 13, 23, 8, 7, 15, 6, 11, 29, 10, 31, 7, 14, 19, 12, 9, 37, 21, 16, 10, 41, 12, 43, 15, 10, 25, 47, 9, 9, 9, 20, 17, 53, 8, 16, 12, 22, 31, 59, 12, 61, 33, 12, 8, 18, 16, 67, 21, 26, 14, 71, 10
Offset: 1

Views

Author

Michel Marcus, Oct 08 2020

Keywords

Comments

First differs from A106492 for n=64.

Examples

			For n = 18 = 2*3^2, a(18) = 2 + (3+2) = 7.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t;
      add(t[1]+t[2],t=subs(1=0,ifactors(n)[2]));
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 13 2020
  • Mathematica
    a[1] = 0; a[n_] := Plus @@ First /@ (f = FactorInteger[n]) + Plus @@ Select[Last /@ f, # > 1 &]; Array[a, 100] (* Amiram Eldar, Oct 08 2020 *)
  • PARI
    a(n) = my(f=factor(n)); vecsum(f[,1]) + sum(k=1, #f~, if (f[k,2]!=1, f[k,2]));

Formula

a(n) = A008474(n) for powerful numbers (A001694).

A349674 a(n) is the least v-palindrome in base n.

Original entry on oeis.org

175, 1280, 6, 288, 10, 731, 14, 93, 18, 135, 22, 63, 26, 291, 109, 581, 34, 144, 38, 24, 51, 1145, 46, 273, 50, 260, 335, 63, 58, 360, 62, 141, 110, 513, 224, 1404, 74, 140, 294, 189, 82, 224, 86, 344, 105, 2410, 94, 417, 98, 176, 497, 56, 106, 76, 60, 189, 1385, 3952, 100
Offset: 2

Views

Author

Michel Marcus, Nov 24 2021

Keywords

Comments

A v-palindrome in base n is a number k that is not palindromic in base n, but for which A338038(k) = A338038(reverse(k) in base n).

Examples

			a(10) = A338039(1) = 18.
		

Crossrefs

Programs

  • Mathematica
    s[1] = 0; s[n_] := Plus @@ First /@ (f = FactorInteger[n]) + Plus @@ Select[Last /@ f, # > 1 &]; a[b_] := Module[{k = b+1, r}, While[!(!Divisible[k, b] && k != (r = IntegerReverse[k,b]) && s[k] == s[IntegerReverse[k, b]]), k++]; k]; Array[a, 100, 2] (* Amiram Eldar, Nov 24 2021 *)
  • PARI
    f(n) = my(f=factor(n)); vecsum(f[, 1]) + sum(k=1, #f~, if (f[k, 2]!=1, f[k, 2])); \\ A338038
    isok(m, b) = my(r=fromdigits(Vecrev(digits(m, b)), b)); (m % b) && (m != r) && (f(r) == f(m));
    a(n) = my(k=1); while (!isok(k, n), k++); k;

A338371 Integers for which there exists a self-repetition that is a term of A338166.

Original entry on oeis.org

13, 17, 18, 19, 26, 31, 37, 39, 48, 49, 56, 62, 65, 71, 73, 79, 81, 84, 91, 93, 94, 97, 103
Offset: 1

Views

Author

Michel Marcus, Oct 23 2020

Keywords

Examples

			18 is a term since 1818 is a term of A338166.
48 is a term since 484848 is a term of A338166.
List of terms with their minimum number of repetitions : [13, 15], [17, 280], [18, 2], [19, 819], [26, 15], [31, 15], [37, 12], [39, 15], [48, 3], [49, 3243], [56, 3], [62, 15], [65, 3], [71, 280], [73, 12], [79, 624], [81, 2], [84, 3], [91, 819], [93, 15], [94, 3243], [97, 624], [103, 10234].
		

Crossrefs

Programs

  • PARI
    f(n) = my(f=factor(n)); vecsum(f[,1]) + sum(k=1, #f~, if (f[k,2]!=1, f[k,2])); \\ A338038
    period(vp,n) = {my(p = 1, pten = 10^#Str(n)); for (i=1, #vp, if ((vp[i] != 2) && (vp[i] != 5), p = lcm(p, znorder(Mod(pten, vp[i]))); p = lcm(p, znorder(Mod(pten, vp[i]^2))););); p;}
    isok(n) = {my(r = fromdigits(Vecrev(digits(n)))); my(vp = setunion(factor(n)[,1]~, factor(r)[,1]~)); my(nbmax = period(vp, n)); if (nbmax == 1, nbmax = 2); my(krep=1); my(pten = 10^#Str(n)); for (k=2, nbmax, krep = pten*krep+1; my(q=1); for (i=1, #vp, my(va = valuation(krep, vp[i])); q *= vp[i]^va;); if (f(n*q) == f(r*q), return(k);););}
    ispal(n) = my(d=Vecrev(digits(n))); n == fromdigits(d);
    lista(nn) = {for (n=1, nn, if ((n % 10) && !ispal(n), if (isok(n), print1(n, ", "));););}
Showing 1-4 of 4 results.