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-5 of 5 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

A008851 Congruent to 0 or 1 mod 5.

Original entry on oeis.org

0, 1, 5, 6, 10, 11, 15, 16, 20, 21, 25, 26, 30, 31, 35, 36, 40, 41, 45, 46, 50, 51, 55, 56, 60, 61, 65, 66, 70, 71, 75, 76, 80, 81, 85, 86, 90, 91, 95, 96, 100, 101, 105, 106, 110, 111, 115, 116, 120, 121, 125, 126, 130, 131, 135, 136, 140, 141, 145, 146, 150, 151
Offset: 1

Views

Author

Keywords

Comments

Numbers k that have the same last digit as k^2.

References

  • L. E. Dickson, History of the Theory of Numbers, I, p. 459.

Crossrefs

Programs

  • Haskell
    a008851 n = a008851_list !! (n-1)
    a008851_list = [10*n + m | n <- [0..], m <- [0,1,5,6]]
    -- Reinhard Zumkeller, Jul 27 2011
    
  • Magma
    [n: n in [0..200] | n mod 5 in {0, 1}]; // Vincenzo Librandi, Nov 17 2014
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+5 od: seq(a[n], n=0..61); # Zerinvary Lajos, Mar 16 2008
  • Mathematica
    Select[Range[0, 151], MemberQ[{0, 1}, Mod[#, 5]] &] (* T. D. Noe, Mar 31 2013 *)
  • PARI
    a(n) = 5*(n\2)+bitand(n,1); /* Joerg Arndt, Mar 31 2013 */
    
  • PARI
    a(n) = floor((5/3)*floor(3*(n-1)/2)); /* Joerg Arndt, Mar 31 2013 */
    

Formula

a(n) = 5*n - a(n-1) - 9, n >= 2. - Vincenzo Librandi, Nov 18 2010 [Corrected for offset by David Lovler, Oct 10 2022]
G.f.: x^2*(1+4*x) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 07 2011
a(n+1) = Sum_{k>=0} A030308(n,k)*A146523(k). - Philippe Deléham, Oct 17 2011
a(n) = floor((5/3)*floor(3*(n-1)/2)). - Clark Kimberling, Jul 04 2012
a(n) = (10*n - 13 - 3*(-1)^n)/4. - Robert Israel, Nov 17 2014 [Corrected by David Lovler, Sep 21 2022]
E.g.f.: 4 + ((10*x - 13)*exp(x) - 3*exp(-x))/4. - David Lovler, Sep 11 2022
Sum_{n>=2} (-1)^n/a(n) = sqrt(1+2/sqrt(5))*Pi/10 + log(phi)/(2*sqrt(5)) + log(5)/4, where phi is the golden ratio (A001622). - Amiram Eldar, Oct 12 2022

Extensions

Offset corrected by Reinhard Zumkeller, Jul 27 2011

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

Original entry on oeis.org

0, 1, 10, 11, 95, 96, 100, 101, 105, 110, 125, 950, 960, 976, 995, 996, 1000, 1001, 1005, 1006, 1010, 1011, 1021, 1025, 1026, 1036, 1046, 1050, 1100, 1101, 1105, 1201, 1205, 1250, 1276, 1305, 1316, 1376, 1405, 9500, 9505, 9511, 9525, 9600, 9605, 9625
Offset: 1

Views

Author

Keywords

Comments

Contains A038444. In particular, the sequence is infinite. - Robert Israel, Oct 20 2016
If n is any positive term, then b_n(k) := n*10^k (k >= 0) is an infinite subsequence. - Rick L. Shepherd, Nov 01 2016
From Robert Israel's comment it follows that the subsequence of terms with no trailing zeros is also infinite (contains A000533). - Rick L. Shepherd, Nov 01 2016

Examples

			110^2 = 12100 (insert "2" and "0" into "1_1_0").
		

Crossrefs

Cf. A045953, A008851, A018834, A038444, A086457 (subsequence).

Programs

  • Haskell
    import Data.List (isInfixOf)
    a046851 n = a046851_list !! (n-1)
    a046851_list = filter chi a008851_list where
       chi n = (x == y && xs `isSub` ys) where
          x:xs = show $ div n 10
          y:ys = show $ div (n^2) 10
       isSub [] ys       = True
       isSub _  []       = False
       isSub us'@(u:us) (v:vs)
             | u == v    = isSub us vs
             | otherwise = isSub us' vs
    -- Reinhard Zumkeller, Jul 27 2011
  • Maple
    IsSublist:= proc(a, b)
      local i,bp,j;
      bp:= b;
      for i from 1 to nops(a) do
        j:= ListTools:-Search(a[i],bp);
        if j = 0 then return false fi;
        bp:= bp[j+1..-1];
      od;
      true
    end proc:
    filter:= proc(n) local A,B;
      A:= convert(n,base,10);
      B:= convert(n^2,base,10);
      if not(A[1] = B[1] and A[-1] = B[-1]) then return false fi;
      if nops(A) <= 2 then return true fi;
      IsSublist(A[2..-2],B[2..-2])
    end proc:
    select(filter, [$0..10^4]); # Robert Israel, Oct 20 2016
  • Mathematica
    id[n_]:=IntegerDigits[n];
    insQ[n_]:=First[id[n]]==First[id[n^2]]&&Last[id[n]]==Last[id[n^2]];
    sort[n_]:=Flatten/@Table[Position[id[n^2],id[n][[i]]],{i,1,Length[id[n]]}];
    takeQ[n_]:=Module[{lst={First[sort[n][[1]]]}},
       Do[
        Do[
         If[Last[lst]Ivan N. Ianakiev, Oct 19 2016 *)

A045953 Numbers m such that m^2 can be obtained from m by inserting an internal block of (contiguous) digits.

Original entry on oeis.org

0, 1, 10, 11, 95, 96, 100, 101, 125, 976, 995, 996, 1000, 1001, 1025, 1376, 9625, 9976, 9995, 9996, 10000, 10001, 10025, 10376, 10625, 99376, 99625, 99976, 99995, 99996, 100000, 100001, 100025, 100376, 100625, 109376, 990625, 999376, 999625, 999976
Offset: 1

Views

Author

John "MazeMan" Knoderer (Webmaster(AT)Mazes.com)

Keywords

Comments

All terms of this sequence appear in A086457. - Jeremy Gardiner, Jul 20 2003
It seems that for any nonnegative integer k the number of k-digit terms is 2k. - Ivan N. Ianakiev, Aug 17 2021

Examples

			95^2 = 9025 (insert '02' inside '95').
		

Crossrefs

Programs

  • Haskell
    import Data.List (isPrefixOf, inits, isSuffixOf, tails)
    a045953 n = a045953_list !! (n-1)
    a045953_list = filter chi a008851_list where
       chi n = (x == y && xs `isSub'` ys) where
          x:xs = show $ div n 10
          y:ys = show $ div (n^2) 10
          isSub' us vs = any id $ zipWith (&&)
                                  (map (`isPrefixOf` vs) $ inits us)
                                  (map (`isSuffixOf` vs) $ tails us)
    -- Reinhard Zumkeller, Jul 27 2011

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

Original entry on oeis.org

0, 1, 10, 11, 29, 34, 99, 100, 101, 104, 105, 106, 109, 110, 111, 114, 115, 116, 119, 120, 121, 124, 125, 274, 275, 276, 279, 280, 281, 284, 285, 286, 289, 290, 291, 294, 295, 296, 299, 311, 314, 315, 316, 319, 320, 321, 324, 325, 326, 329, 330, 331, 334, 335
Offset: 0

Views

Author

Jeremy Gardiner, Jul 20 2003

Keywords

Comments

Intersection of A008854 and A144582. - Michel Marcus, Mar 19 2015

Examples

			a(12) = 109 appears in the sequence because 109*109*109 = 1295029.
		

Crossrefs

Cf. A086457 (similar sequence with squares).
Cf. A008854 (initial digit), A144582 (final digit).

Programs

  • Mathematica
    sidQ[n_]:=Module[{idn=IntegerDigits[n],i3=IntegerDigits[n^3]},idn[[1]]==i3[[1]]&&idn[[-1]]== i3[[-1]]]; Select[Range[0,400],sidQ] (* Harvey P. Dale, May 14 2023 *)
  • PARI
    isok(n) = (n == 0) || ((dn=digits(n)) && (ds=digits(n^3)) && (dn[#dn] == ds[#ds])); \\ Michel Marcus, Mar 19 2015

Formula

left$(str$(n), 1) = left$(str$(n^3), 1) AND right$(str$(n), 1) = right$(str$(n^3), 1)
Showing 1-5 of 5 results.