login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316347 a(n) = n^2 mod(10^m), where m is the number of digits in n (written in base 10). 1
0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 21, 44, 69, 96, 25, 56, 89, 24, 61, 0, 41, 84, 29, 76, 25, 76, 29, 84, 41, 0, 61, 24, 89, 56, 25, 96, 69, 44, 21, 0, 81, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 0, 21, 44, 69, 96, 25, 56, 89, 24, 61, 0, 41, 84, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

The set of the terms is the same as that of A238712.

LINKS

Georg Fischer, Table of n, a(n) for n = 0..10000, Jan 16 2019 (terms a(0..719585) initially submitted by Christopher D Chamness).

EXAMPLE

n = 13 has 2 digits in base 10, thus a(13) = 169 mod 100 = 69.

PROG

(Python)

i=1

while True:

     m=i

     j=i**2

     l=0

     while True:

          m=m/10

          l+=1

          if m==0:

               break

     mod_num = 10**l

     print j%mod_num

     i+=1

(PARI) a(n) = n^2 % 10 ^ #digits(n) \\ David A. Corneth, Jun 30 2018

(Perl) my $mod = 10;

foreach my $i(0..10000) {

     print "$i " . (($i * $i) % $mod) . "\n";

     if (length($i + 1) > length($i)) { $mod *= 10; }

} # Georg Fischer, Jan 16 2019

CROSSREFS

Cf. A238712.

Sequence in context: A200632 A186723 A008959 * A169917 A059729 A184988

Adjacent sequences:  A316344 A316345 A316346 * A316348 A316349 A316350

KEYWORD

nonn,base,easy

AUTHOR

Christopher D Chamness, Jun 29 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 17 19:37 EST 2019. Contains 320223 sequences. (Running on oeis4.)