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.

A251755 Digital root of n + n^2.

This page as a plain text file.
%I A251755 #24 Jul 25 2016 09:52:22
%S A251755 0,2,6,3,2,3,6,2,9,9,2,6,3,2,3,6,2,9,9,2,6,3,2,3,6,2,9,9,2,6,3,2,3,6,
%T A251755 2,9,9,2,6,3,2,3,6,2,9,9,2,6,3,2,3,6,2,9,9,2,6,3,2,3,6,2,9,9,2,6,3,2,
%U A251755 3,6,2,9,9,2,6,3,2,3,6,2,9,9,2,6,3,2,3,6,2,9,9,2,6,3,2,3,6,2,9,9,2,6,3,2,3
%N A251755 Digital root of n + n^2.
%C A251755 Positive integers give a cycle of period 9: {2, 6, 3, 2, 3, 6, 2, 9, 9}, which may be expressed as a decimal expansion of 87745433/333333333. Note that a(-n)=a(n-1), and negative integers give a mirrored period cycle, generating the cycle in reverse. Sequence is palindromic.
%C A251755 a(n) equals the digital root sum of A010888 and A056992.
%H A251755 <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 1).
%F A251755 a(n) = A010888(A002378(n)).
%e A251755 For a(7) = 2 because 7+7^2 = 56, and 5+6 = 11, yielding result of digital root of 2 (1+1).
%e A251755 For a(-3) = 6 because -3+(-3)^2 = -6, with digital root of 6.
%t A251755 a251755[n_Integer] := Module[{f},
%t A251755   f[x_] := Last@NestWhileList[Plus @@ IntegerDigits[#] &, x, # > 9 &];
%t A251755 f /@ Table[i + i^2, {i, 0, n}]]; a251755[60] (* _Michael De Vlieger_, Dec 17 2014 *)
%o A251755 (PARI) DR(n)=s=sumdigits(n);while(s>9,s=sumdigits(s));s
%o A251755 for(n=0,100,print1(DR(abs(n+n^2)),", ")) \\ _Derek Orr_, Dec 30 2014
%Y A251755 Cf. A002378, A010888, A056992.
%K A251755 nonn,base,easy
%O A251755 0,2
%A A251755 _Peter M. Chema_, Dec 07 2014