login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A219195 Least i > 1 such that the sum of the digits in the base-j representation of i is invariant over all j in the first n squarefree numbers. 0

%I #14 May 25 2013 08:16:22

%S 2,6,6,687,1386,82305020

%N Least i > 1 such that the sum of the digits in the base-j representation of i is invariant over all j in the first n squarefree numbers.

%e For n = 4 the number 687 is the least i > 1 such that s_2 (i) = s_3 (i) = s_5 (i) = s_6 (i), where s_k (i) is the sum of the digits in the base-k representation of i.

%o (PARI) tsqf(n) = {sqfs = vector(n); ipos = 1; na = 2; while (ipos <= n, if (issquarefree(na), sqfs[ipos] = na; ipos++;); na++;); return (sqfs);}

%o iok(i, sqfs) = {vdig = digits(i, sqfs[1]); sdig = sum(k=1, #vdig, vdig[k]); for (j=2, #sqfs, vdig = digits(i, sqfs[j]); if (sum(k=1, #vdig, vdig[k]) != sdig, return(0));); return (1);}

%o a(n) = {sqfs = tsqf(n); ok = 0; i = 2; while(! ok, if (iok(i, sqfs), ok = 1, i++);); return (i);} \\ _Michel Marcus_, May 25 2013

%Y Cf. A005117 (squarefree numbers).

%K nonn,base

%O 1,1

%A _Jeffrey Shallit_, Nov 14 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)