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.

A247315 Numbers x such that the sum of all their cyclic permutations is equal to that of all cyclic permutations of sigma(x).

Original entry on oeis.org

1, 15, 24, 69, 114, 133, 147, 153, 186, 198, 258, 270, 276, 288, 306, 339, 366, 393, 429, 474, 495, 507, 609, 627, 639, 717, 763, 817, 871, 1062, 1080, 1083, 1086, 1141, 1149, 1158, 1224, 1257, 1266, 1267, 1278, 1305, 1339, 1356, 1374, 1377, 1386, 1431, 1446
Offset: 1

Views

Author

Paolo P. Lava, Sep 12 2014

Keywords

Examples

			The sum of the cyclic permutations of 153 is 153 + 315 + 531 = 999; sigma(153) = 234 and the sum of its cyclic permutations is 234 + 423 + 342 = 999.
The sum of the cyclic permutations of 4731 is 4731 + 1473 + 3147 + 7314 = 16665; sigma(4731) = 6720 and the sum of its cyclic permutations is 6720 + 672 + 2067 + 7206 = 16665.
		

Crossrefs

Programs

  • Maple
    with(numtheory):P:=proc(q) local a,b,c,d,k,n;
    for n from 1 to q do a:=n; b:=a; c:=ilog10(a);
    for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); b:=b+a; od;
    a:=sigma(n); d:=a; c:=ilog10(a);
    for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); d:=d+a; od;
    if d=b then print(n); fi; od; end: P(10^9);
  • Mathematica
    scp[n_]:=Total[FromDigits/@Table[RotateRight[IntegerDigits[n],k],{k,IntegerLength[ n]}]]; Select[Range[1500],scp[#] == scp[DivisorSigma[ 1,#]]&] (* Harvey P. Dale, Nov 08 2020 *)

A247317 Numbers x such that the sum of all their cyclic permutations is equal to that of all cyclic permutations of sigma(x) and all cyclic permutations of Euler totient function phi(x).

Original entry on oeis.org

1, 2907, 3339, 3726, 4293, 4371, 4614, 5049, 5319, 5607, 5751, 6291, 17901, 18009, 18441, 19413, 20349, 20655, 20943, 21219, 21267, 21573, 21627, 22137, 22191, 23355, 24831, 25647, 25731, 26019, 26145, 26163, 27405, 27537, 28035, 28215, 28227, 28305, 29601, 30429
Offset: 1

Views

Author

Paolo P. Lava, Sep 12 2014

Keywords

Comments

Intersection of A247315 and A247316.
All numbers appear to be multiples of 3.
Big steps between a(135) and a(136), a(1387) and a(1388),...

Examples

			The sum of the cyclic permutations of 4371 is 4371 + 1437 + 7143 + 3714 = 16667; sigma(4371) = 6144 and the sum of its cyclic permutations is 6144 + 4614 + 4461 + 1446 = 16667; phi(4371) = 2760 and the sum of its cyclic permutations is2760+276+6027+7602 = 16667.
The sum of the cyclic permutations of 24831 is 24831 + 12483 + 31248 + 83124 + 48312 = 199998; sigma(24831) = 37440 and the sum of its cyclic permutations is 37440 + 3744 + 40374 + 44037 + 74403 = 199998; phi(24831) = 15840 and the sum of its cyclic permutations is 15840 + 1584 + 40158 + 84015 + 58401 = 199998.
		

Crossrefs

Programs

  • Maple
    with(numtheory):P:=proc(q) local a,b,c,d,f,k,n;
    for n from 1 to q do a:=n; b:=a; c:=ilog10(a);
    for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); b:=b+a; od;
    a:=sigma(n); d:=a; c:=ilog10(a);
    for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); d:=d+a; od;
    a:=phi(n); f:=a; c:=ilog10(a);
    for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); f:=f+a; od;
    if b=d and d=f then print(n); fi; od; end: P(10^9);

A247552 Least numbers x such that the ratio of the sum of all the cyclic permutations of x, plus the unpermuted number, and x itself is equal to n.

Original entry on oeis.org

1, 11, 111, 1111, 11111, 111111, 428571, 11111111, 111111111, 1111111111, 1818, 111111111111, 230769, 428571428571, 111111111111111, 1111111111111111, 4705882352941176, 111111111111111111, 473684210526315789, 11111111111111111111, 142857, 18181818
Offset: 1

Views

Author

Paolo P. Lava, Sep 19 2014

Keywords

Comments

Mainly repdigit numbers with n 1's.
If x has m digits with sum s then the sum of the m cyclic permutations of x (including x itself) is s*(10^m-1)/9, since each digit occurs once in each position. My program uses this to test potential (m, s) pairs. - Jens Kruse Andersen, Sep 23 2014
If appears that the number of digits of a(n) is n-1 if and only if n is a full reptend prime (A001913). - Michel Marcus, Sep 24 2014
There are 106 repdigit numbers with n 1's in the first 5000 terms. - Jens Kruse Andersen, Sep 30 2014

Examples

			428571 is the minimum number such that 428571 + 142857 + 714285 + 571428 + 857142 + 285714 = 2999997 and 2999997 / 428571 = 7.
1818 is the minimum number such that 1818 + 8181 + 1818 + 8181 = 19998 and 19998 / 1818 = 11.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a, b, c, d, j, n, t, v;
    v:=array(1..100); for j from 1 to 100 do v[j]:=0; od; t:=0;
    for n from 1 to q do a:=n; b:=a; c:=ilog10(a);
    for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); b:=b+a; od;
    if type(b/n,integer) then if b/n=t+1
    then t:=t+1; lprint(t,n); while v[t+1]>0 do t:=t+1; lprint(t,v[t]); od;
    else if b/n>t+1 then if v[b/n]=0 then v[b/n]:=n; fi; fi;
    fi; fi; od; end: P(10^6);
  • PARI
    isok(n, k) = {d = digits(k); nbd = #d; sp = 0; for (i=1, nbd, dpk = vector(nbd-1, j, d[j+1]); dpk = concat(dpk, d[1]); sp += subst(Pol(dpk, x), x, 10); d = dpk;); sp == k*n;}
    a(n) = {k = 1; while(! isok(n, k), k++;); k ;} \\ Michel Marcus, Sep 21 2014
    
  • PARI
    a(n)=my(r=0,m,g,s,x); for(m=1, n, r=10*r+1; g=n/gcd(r, n); forstep(s=g, 9*m, g, x=s*r/n; if(#digits(x)==m && sumdigits(x)==s, return(x))))
    vector(30, n, a(n)) \\ Faster program. Jens Kruse Andersen, Sep 23 2014

Extensions

a(12)-a(22) from Jens Kruse Andersen, Sep 23 2014
Showing 1-3 of 3 results.