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.

A010879 Final digit of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
Offset: 0

Views

Author

Keywords

Comments

Also decimal expansion of 137174210/1111111111 = 0.1234567890123456789012345678901234... - Jason Earls, Mar 19 2001
In general the base k expansion of A062808(k)/A048861(k) (k>=2) will produce the numbers 0,1,2,...,k-1 repeated with period k, equivalent to the sequence n mod k. The k-digit number in base k 123...(k-1)0 (base k) expressed in decimal is A062808(k), whereas A048861(k) = k^k-1. In particular, A062808(10)/A048861(10)=1234567890/9999999999=137174210/1111111111.
a(n) = n^5 mod 10. - Zerinvary Lajos, Nov 04 2009

Crossrefs

Cf. A008959, A008960, A070514. - Doug Bell, Jun 15 2015
Partial sums: A130488. Other related sequences A130481, A130482, A130483, A130484, A130485, A130486, A130487.

Programs

Formula

a(n) = n mod 10.
Periodic with period 10.
From Hieronymus Fischer, May 31 and Jun 11 2007: (Start)
Complex representation: a(n) = 1/10*(1-r^n)*sum{1<=k<10, k*product{1<=m<10,m<>k, (1-r^(n-m))}} where r=exp(Pi/5*i) and i=sqrt(-1).
Trigonometric representation: a(n) = (256/5)^2*(sin(n*Pi/10))^2 * sum{1<=k<10, k*product{1<=m<10,m<>k, (sin((n-m)*Pi/10))^2}}.
G.f.: g(x) = (Sum_{k=1..9} k*x^k)/(1-x^10) = -x*(1 +2*x +3*x^2 +4*x^3 +5*x^4 +6*x^5 +7*x^6 +8*x^7 +9*x^8) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ).
Also: g(x) = x*(9*x^10-10*x^9+1)/((1-x^10)*(1-x)^2).
a(n) = n mod 2+2*(floor(n/2)mod 5) = A000035(n) + 2*A010874(A004526(n)).
Also: a(n) = n mod 5+5*(floor(n/5)mod 2) = A010874(n)+5*A000035(A002266(n)). (End)
a(n) = 10*{n/10}, where {x} means fractional part of x. - Enrique Pérez Herrero, Jul 30 2009
a(n) = n - 10*A059995(n). - Reinhard Zumkeller, Jul 26 2011
a(n) = n^k mod 10, for k > 0, where k mod 4 = 1. - Doug Bell, Jun 15 2015

Extensions

Formula section edited for better readability by Hieronymus Fischer, Jun 13 2012

A086457 Both n and n^2 have the same initial digit and also n and n^2 have the same final digit when expressed in base 10.

Original entry on oeis.org

0, 1, 10, 11, 95, 96, 100, 101, 105, 106, 110, 111, 115, 116, 120, 121, 125, 126, 130, 131, 135, 136, 140, 141, 895, 896, 950, 951, 955, 956, 960, 961, 965, 966, 970, 971, 975, 976, 980, 981, 985, 986, 990, 991, 995, 996, 1000, 1001, 1005, 1006, 1010, 1011
Offset: 1

Views

Author

Jeremy Gardiner, Jul 20 2003

Keywords

Comments

All terms of A045953 appear in this sequence.
Subsequence of A008851; A045953 and A046851 are subsequences. [Reinhard Zumkeller, Jul 27 2011]
Intersection of A008851 and A089951. - Michel Marcus, Mar 19 2015

Examples

			a(12) = 115 appears in the sequence because 115*115 = 13225.
		

Crossrefs

Programs

  • BASIC
    left$(str$(n), 1) = left$(str$(n^2), 1) AND right$(str$(n), 1) = right$(str$(n^2), 1)
    
  • Haskell
    a086457 n = a086457_list !! (n-1)
    a086457_list = filter (\x -> a000030 x == a000030 (x^2) &&
                                 a010879 x == a010879 (x^2)) [0..]
    -- Reinhard Zumkeller, Jul 27 2011
  • Mathematica
    ldQ[n_]:=Module[{idn=IntegerDigits[n],idn2=IntegerDigits[n^2]}, First[ idn] == First[idn2]&&Last[idn]==Last[idn2]]; Select[Range[ 0,1100], ldQ]  (* Harvey P. Dale, Feb 06 2011 *)

Formula

A000030(a(n)) = A000030(a(n)^2) and A010879(a(n)) = A010879(a(n)^2).

Extensions

Offset corrected by Reinhard Zumkeller, Jul 27 2011

A179856 Numbers n such that n^3 can be obtained from n by inserting internal (but not necessarily contiguous) digits.

Original entry on oeis.org

10, 11, 29, 34, 99, 100, 101, 106, 109, 110, 114, 119, 120, 124, 125, 274, 275, 276, 279, 281, 290, 296, 299, 314, 315, 316, 319, 320, 324, 325, 329, 330, 335, 336, 340, 966, 970, 975, 976, 979, 986, 990, 996, 999, 1000, 1001, 1004, 1005, 1006, 1010, 1020, 1021, 1024, 1025, 1034, 1049, 1051
Offset: 1

Views

Author

Jonathan Vos Post, Jan 28 2011

Keywords

Comments

This is to A046851 as cubes A000578 are to squares A000290. A subset of A086458 (but note that, i.e., 104^3 = 1124864 starts and ends with the same digits as 104, but lacks an internal "0"). If we require the inserted digits to fill contiguous places, another sequence results, which does not contain 106, for example.

Examples

			34^3 = 39304 (insert "930" into "34").
106^3 = 1191016 (insert "191" and "1" into "106").
		

Crossrefs

Programs

  • Maple
    A000030 := proc(n) if n= 0 then 0; else op(-1,convert(n,base,10)) ; end if; end proc:
    A010879 := proc(n) n mod 10 ; end proc:
    isA086458 := proc(n) A000030(n) = A000030(n^3) and A010879(n) = A010879(n^3) ; end proc:
    subsI := proc(c,L) for i from 1 to nops(L) do if op(i,L) = c then return i; end if; end do; return -1 ; end proc:
    isSubS := proc(Sub,Sup) if nops(Sub) = 1 then if subsI(op(1,Sub),Sup) > 0 then return true; else return false; end if; elif nops(Sub) = 0 then return true; else f := subsI(op(1,Sub),Sup) ; if f < 0 then return false; else procname( subsop(1=NULL,Sub), [op(f+1..nops(Sup),Sup)] ) ; end if; end if; end proc:
    isA179856 := proc(n) if isA086458(n) then dgsn := convert(n,base,10) ; dgsn := op(2..nops(dgsn)-1,dgsn) ; dgsn3 := convert(n^3,base,10) ; dgsn3 := op(2..nops(dgsn3)-1,dgsn3) ; isSubS([dgsn],[dgsn3]) ; else false; end if; end proc:
    for n from 10 to 1400 do if isA179856(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Jan 30 2011
Showing 1-3 of 3 results.