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

A077200 Erroneous version of A085072.

Original entry on oeis.org

0, 1, 2, 5, 2, 4, 4, 23, 16, 4, 2, 6, 4, 1, 6, 65, 2, 2, 4, 8, 1, 4, 6, 16, 24, 7, 98, 16, 2, 12, 6, 211, 1, 1, 3, 64, 4, 1, 7
Offset: 1

Views

Author

Keywords

A081761 Least number >n having same type of prime factorization, a(1)=1.

Original entry on oeis.org

1, 3, 5, 9, 7, 10, 11, 27, 25, 14, 13, 18, 17, 15, 21, 81, 19, 20, 23, 28, 22, 26, 29, 40, 49, 33, 125, 44, 31, 42, 37, 243, 34, 35, 38, 100, 41, 39, 46, 54, 43, 66, 47, 45, 50, 51, 53, 80, 121, 52, 55, 63, 59, 56, 57, 88, 58, 62, 61, 84, 67, 65, 68, 729, 69, 70, 71, 75, 74, 78
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 09 2003

Keywords

Crossrefs

Programs

  • Mathematica
    sig[n_] := Sort @ FactorInteger[n][[;; , 2]]; a[1] = 1; a[n_] := Module[{sign = sig[n], k = n + 1}, While[sig[k] != sign, k++]; k]; Array[a, 70] (* Amiram Eldar, Dec 26 2020 *)
  • PARI
    a(n) = {if (n==1, 1, my(k=1, s = vecsort(factor(n)[,2]~)); while (vecsort(factor(n+k)[,2]~) != s, k++); n+k;)} \\ Michel Marcus, Nov 02 2020

Formula

A046523(a(n)) = A046523(n).
a(n) = n + A085072(n). - Amiram Eldar, Dec 26 2020

A086489 Smallest k such that k and k + n have the same prime signature.

Original entry on oeis.org

2, 3, 2, 3, 2, 5, 14, 3, 2, 3, 2, 5, 21, 3, 2, 3, 2, 5, 8, 3, 2, 7, 10, 5, 10, 3, 2, 3, 2, 7, 15, 5, 6, 3, 2, 5, 14, 3, 2, 3, 2, 5, 14, 3, 2, 7, 10, 5, 6, 3, 2, 6, 21, 5, 10, 3, 2, 3, 2, 7, 21, 5, 6, 3, 2, 5, 10, 3, 2, 3, 2, 7, 14, 5, 10, 3, 2, 5, 6, 3, 2, 7, 10, 5, 6, 3, 2, 6, 6, 7, 15, 5, 22, 3, 2, 5, 14
Offset: 1

Views

Author

Amarnath Murthy, Jul 28 2003

Keywords

Examples

			a(7) = 14 as 14 and 14+7 = 21 have the same prime signature p*q.
a(13) = 21 as 21 is the smallest number such that 21 +13 = 34 and 21 both have the same prime signature p*q.
a(19) = 8 as 8 +19 = 27 = 3^3,8 = 2^3 both have the prime signature p^3.
		

Crossrefs

Programs

  • PARI
    ps(n) = local(f); f = factor(n); vecsort(f[,2]); a(n) = local(P, m, v); P = vector(n, i, ps(i)); m = 1; while (1, for (i = 1, n, v = ps(m*n + i); if (v == P[i], return((m - 1)*n + i), P[i] = v)); m++); \\ David Wasserman, Mar 09 2005

Extensions

More terms from David Wasserman, Mar 09 2005

A085073 Smallest k such that n+k and n*k have the same prime signature, or 0 if no such number exists.

Original entry on oeis.org

2, 1, 7, 41, 15, 134, 3, 127, 11, 2, 3, 548, 2, 1, 3, 389, 5, 582, 2, 316, 1, 38, 3, 2216, 3, 2, 13, 212, 5, 2742, 2, 1669, 1, 1, 31, 2764, 2, 1, 13, 1094, 4, 2298, 3, 1, 123, 14, 11, 8912, 3, 202, 17, 2, 2, 1146, 23, 904, 1, 26, 3, 11028, 13, 22, 57, 3581, 37, 1194, 2, 172, 15
Offset: 1

Views

Author

Amarnath Murthy, Jul 01 2003

Keywords

Examples

			a(6) = 379 as 6*379 = 2*3*379 and 6+379 = 385 = 5*7*11 both have prime signature p*q*r.
		

Crossrefs

Cf. A052213 (a(n)=1), A085072.

Programs

  • Maple
    s:= proc(n) s(n):= sort(map(i-> i[2], ifactors(n)[2])) end:
    a:= proc(n) option remember; local k; for k
           while s(n*k)<>s(n+k) do od; k
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, Mar 06 2019
  • Mathematica
    kmax = 10^6;
    s[n_] := FactorInteger[n][[All, 2]] // Sort;
    a[n_] := Module[{k}, If[n == 1, Return[2]]; For[k = 1, k <= kmax, k++, If[s[n k] == s[n+k], Return[k]]]; 0];
    Array[a, 70] (* Jean-François Alcover, Nov 17 2020 *)
  • PARI
    sgntr(n) = vecsort(factor(n)[, 2]~);
    a(n) = {my(k=1); while (sgntr(n+k) != sgntr(n*k), k++); k; } \\ Michel Marcus, Nov 17 2020

Extensions

Corrected by Jason Earls, Jul 10 2003
More terms from David Wasserman, Jan 12 2005

A085080 Smallest k such that n, k and n+k have the same prime signature (canonical form), or 0 if no such number exists.

Original entry on oeis.org

0, 3, 2, 0, 2, 15, 0, 0, 0, 55, 2, 63, 0, 21, 6, 0, 2, 45, 0, 637, 14, 33, 0, 351, 0, 39, 0, 147, 2, 165, 0, 0, 6, 21, 22, 0, 0, 39, 26, 20237, 2, 231, 0, 325, 18, 39, 0, 4136875, 0, 18, 6, 423, 0, 135, 10, 1375, 34, 33, 2, 90, 0, 15, 12, 0, 21, 165, 0, 207, 22, 385, 2
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 01 2003

Keywords

Comments

a(n) = 2 if n and n+2 form a twin prime pair.
a(n) = 0 if n is a perfect prime power or an odd prime such that n+2 is composite.
Here is a temporary list of integers <= 1000 for which a(n) is unknown (greater than a(48) or 0): 72, 200, 288, 432, 500, 648, 800, 864, 968, 972. - Michel Marcus, David A. Corneth, Mar 08 2019
a(96) = 1841996779; a(160) = 28521479; a(448) = 184390625; a(608) = 4633767. - Michel Marcus, Mar 08 2019
From David A. Corneth, Mar 08 2019: (Start)
By Fermat's Last Theorem, a(m^e) = 0 for e > 2 and positive integer m. For example, a(216) = a(6^3) = 0.
a(n) = 0 for squares < 1000, see worked example for n = 36 for the method.
a(192) = 30927921875, a(320) = 355182331, a(480) = 7771875, a(640) = 18243947439, a(832) = 194546043, a(896) = 2157109375, a(960) = 157546875. For the values to do, they are > 10^11 if a(n) > 0.
If n is even and a(n) > 0 and the exponent of 2 in the factorization of n is the largest in the prime signature then a(n) isn't necessarily odd. Ray Chandler found n = 392 as an example where a(n) = 108 is even. (End)
a(384) = 1281916327741, a(768) <= 1367088016014857. - Daniel Suteu, Mar 18 2019; confirmed by Michel Marcus, Mar 18 2019
a(768) = 85001950390625. - Ray Chandler, Mar 26 2019

Examples

			a(12) = 63 as 12 + 63 = 75, 2^2*3 + 3^2*7 = 5^2*3, all have the prime signature p^2*q.
a(1) = 0, because the only possible value for k is then 1, giving n+k=2, with a different signature.
a(2) = 3, because 2, 3 and 2+3=5 have the same prime signature.
a(36) = 0, because if a(n) exists then k exists such that k^2 + 36 = m^2 where k^2, 36 and m^2 have the same prime signature. Rewriting 36 = m^2 - k^2 = (m - k)*(m + k) and then inspection over divisors of 36 gives no terms. Alternatively checking Pythagorean triples gives the same result. - _David A. Corneth_, Mar 08 2019
		

Crossrefs

Cf. A085072 (only n and n+k have same prime signature), A215199.

Programs

  • Mathematica
    a[n_?PrimeQ] := If[PrimeQ[n + 2], 2, 0]; a[2] = 3; a[36] = 0; ps[n_] := Sort[ FactorInteger[n][[;; , 2]] ]; a[n_] := Module[{k = 2, f = FactorInteger[n]}, ps0 = Sort[f[[;; , 2]]]; If[Length[f] == 1, 0, While[ps[k] != ps0 || ps[n + k] != ps0, k++]; k]]; Array[a, 71] (* Amiram Eldar, Mar 07 2019 works for n <= 71 *)
  • PARI
    sigt(n) = vecsort(factor(n)[,2]~);
    a(n) = {
      if ((n==1) || (isprimepower(n) && !isprime(n)), return(0));
      if (isprimepower(n) && !isprime(n), return(0));
      if ((n!=2) && isprime(n), if (isprime(n+2), return(2), return(0)));
      if (n==36, return(0));
      my(k=2, v = sigt(n));
      while ((sigt(k) != v) || (sigt(n+k) != v), k++);
      k;
    } \\ Michel Marcus, Mar 07 2019; works for n <= 71

Extensions

a(20)-a(47) from Max Alekseyev, Aug 12 2013
a(48)-a(71) from Amiram Eldar, Mar 05 2019
Showing 1-5 of 5 results.