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.

A356631 a(n) is the least number k such that the sum (with multiplicity) of prime factors of k*(k+1)*...*(k+n-1) is a perfect power.

Original entry on oeis.org

1, 4, 2, 1, 4, 5, 2, 1, 11, 18, 8, 12, 8, 15, 4, 41, 10, 65, 10, 39, 21, 5, 54, 30, 25, 2, 1, 17, 43, 2, 1, 80, 12, 41, 206, 11, 70, 39, 81, 5, 289, 50, 18, 56, 24, 10, 49, 103, 146, 77, 53, 582, 31, 58, 37, 419, 140, 174, 77, 44, 100, 168, 44, 42, 99, 13, 11, 80, 60, 101, 71, 12, 24, 70, 11, 52, 671
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 18 2022

Keywords

Examples

			a(5) = 4 because the sum of prime factors of 4*5*6*7*8 = 2^6 * 3 * 5 * 7 is 2*6 + 3 + 5 + 7 = 27 = 3^3 is a perfect power, and 4 is the least number that works.
		

Crossrefs

Programs

  • Maple
    spf:= proc(n) local t; add(t[1]*t[2],t=ifactors(n)[2]) end proc:
    ispow:= proc(n) igcd(map(t -> t[2], ifactors(n)[2]))>1 end proc:
    f:= proc(n) local S,t,i;
      S:= Vector(n,spf); t:= convert(S,`+`);
        for i from 1 do
          if ispow(t) then return i fi;
        t:= t-S[1];
        S[1..n-1]:= S[2..n];
        S[n]:= spf(i+n);
        t:= t+S[n];
      od
    end proc:
    f(1):= 1:
    map(f, [$1..100]);
  • Mathematica
    sopfr[n_] := Plus @@ Times @@@ FactorInteger[n]; powQ[n_] := GCD @@ FactorInteger[n][[;; , 2]] > 1; a[n_] := Module[{k = 1}, While[! powQ[sopfr[Product[k + i, {i, 0, n - 1}]]], k++]; k]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Aug 19 2022 *)