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.

A306354 a(n) = gcd(n, A101337(n)).

This page as a plain text file.
%I A306354 #41 Jan 26 2022 17:57:34
%S A306354 1,2,3,4,5,6,7,8,9,1,1,1,1,1,1,1,1,1,1,4,1,2,1,4,1,2,1,4,1,3,1,1,3,1,
%T A306354 1,9,1,1,3,8,1,2,1,4,1,2,1,16,1,25,1,1,1,1,5,1,1,1,1,12,1,2,9,4,1,6,1,
%U A306354 4,3,7,1,1,1,1,1,1,7,1,1,16,1,2,1,4,1,2,1,8,1,9
%N A306354 a(n) = gcd(n, A101337(n)).
%C A306354 A101337(n) / n = r, r an integer, gives A306360. A101337(n) / n = 1 gives A005188. n / A101337(n) = s, s an integer, gives A306361. The motivation for this sequence was the question as to which numbers n have the property A101337(n) / n = r and the property n / A101337(n) = s?
%e A306354 For n = 24, a(24) = gcd(24, 2*2 + 4*4) = gcd(24,20) = 4, thus a(24) = 4;
%e A306354 for n = 153, a(153) = gcd(153, 1*1*1 + 5*5*5 + 3*3*3) = gcd(153,153) = 153, thus a(153) = 153.
%t A306354 Array[GCD[#1, Total[#2^Length[#2]]] & @@ {#, IntegerDigits@ #} &, 90] (* _Michael De Vlieger_, Feb 09 2019 *)
%o A306354 (PARI) a(n) = my(d=digits(n)); gcd(n, sum(i=1, #d, d[i]^#d)); \\ _Michel Marcus_, Feb 12 2019
%o A306354 (Python)
%o A306354 from math import gcd
%o A306354 def A306354(n): return gcd(n,sum(int(d)**len(str(n)) for d in str(n))) # _Chai Wah Wu_, Jan 26 2022
%Y A306354 Cf. A005188, A066750, A101337.
%K A306354 nonn,base
%O A306354 1,2
%A A306354 _Ctibor O. Zizka_, Feb 09 2019