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.

Previous Showing 11-20 of 29 results. Next

A077430 a(n) = floor(log_10(2*n^2)) + 1.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 05 2002

Keywords

Crossrefs

A114206 Length of the preperiodic part of the decimal expansion of 1/n, and also leading zeros from the period part if the preperiodic digits are all 0s (if any).

Original entry on oeis.org

1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2
Offset: 2

Views

Author

N. J. A. Sloane, Oct 17 2006

Keywords

Comments

Differs from A386406 at n = 92, 208, 248...

Examples

			For n = 11, 1/n = 0.(09), so the preperiodic part is empty and the initial 0 of the periodic part is included for length a(11) = 1.
For n = 92, 1/n = 0.01(0869565217391304347826) , so the preperiodic part is "01" and has length a(92) = 2 and the initial 0 in the periodic part is not included since that preperiodic part is not all 0s (unlike the way A386406(92) = 3 does include that inat periodic initial 0).
		

Crossrefs

Programs

  • Mathematica
    fb[n_] := Block[{rd, o, p},rd = RealDigits[1/n];o = Last[rd];p = First[rd];If[ ! IntegerQ[Last[p]], p = Most[p]];Length[p] - o];Table[fb[n], {n, 120}] (* Ray Chandler, Oct 18 2006 *)
    r[x_]:=RealDigits[1/x]; w[x_]:=First[r[x]]; f[x_]:=First[w[x]]; l[x_]:=Last[w[x]]; z[x_]:=Last[r[x]]; b[x_]:=Which[IntegerQ[l[x]], Length[w[x]]-1*z[x], IntegerQ[f[x]]==False, -1*z[x], True, Length[Drop[w[x],-1]]-1*z[x]]; (* Hans Havermann, Oct 18 2006 *)
    Table[b[i], {i,2,128}]
  • PARI
    a(n) = max(logint(n,10), max(valuation(n,2), valuation(n,5))); \\ Kevin Ryde, Jul 22 2025

Formula

a(n) = max(A004216(n), A051628(n)). - Kevin Ryde, Jul 22 2025

Extensions

More terms from Ray Chandler and Hans Havermann, Oct 18 2006
Edited by Andrei Zabolotskii and Kevin Ryde, Jul 20 2025

A004228 a(n) = 10000*log_10(n) rounded down.

Original entry on oeis.org

0, 3010, 4771, 6020, 6989, 7781, 8450, 9030, 9542, 10000, 10413, 10791, 11139, 11461, 11760, 12041, 12304, 12552, 12787, 13010, 13222, 13424, 13617, 13802, 13979, 14149, 14313, 14471, 14623
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Floor[10^4 Log[10,Range[30]]] (* Harvey P. Dale, Feb 07 2015 *)

A077431 n repeated in decimal representation, but separated by enough zeros that the square has the pattern (n^2)(2n^2)(n^2).

Original entry on oeis.org

11, 22, 303, 404, 505, 606, 707, 8008, 9009, 10010, 11011, 12012, 13013, 14014, 15015, 16016, 17017, 18018, 19019, 20020, 21021, 22022, 230023, 240024, 250025, 260026, 270027, 280028, 290029, 300030, 310031, 320032, 330033, 340034, 350035
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 05 2002

Keywords

Comments

A077433(n) = number of separating zeros.

Examples

			a(17) = 17017, as 17017^2 = 289578289 = A077432(17) = 289'578'289 and 289=17^2 and 578=2*289.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := For[idn = IntegerDigits[n]; k = 0, True, k++, an = FromDigits[ Join[idn, Table[0, k], idn]]; If[MatchQ[IntegerDigits[an^2], {b__ /; IntegerQ[Sqrt[FromDigits[{b}]]], c___, 0..., b__} /; FromDigits[{c}] == 2*FromDigits[{b}]], Return[an]]];
    Array[a, 35] (* Jean-François Alcover, Nov 13 2017 *)

Formula

a(n) = n*(1+10^(1+floor(log_10(2*n^2)))).

A077432 Squares of the form u'v'w, where in decimal representation u=n^2, v=2*n^2 and w=n^2 possibly with a leading zero.

Original entry on oeis.org

121, 484, 91809, 163216, 255025, 367236, 499849, 64128064, 81162081, 100200100, 121242121, 144288144, 169338169, 196392196, 225450225, 256512256, 289578289, 324648324, 361722361, 400800400, 441882441, 484968484, 52910580529
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 05 2002

Keywords

Comments

a(n) = A077431(n)^2.

Examples

			n=42, n^2=1764 and 2*n^2=3528: a(42) = 1764'3528'1764 = 420042^2 = A077431(42)^2.
		

Crossrefs

Formula

a(n) = (n*(1 + 10^(1 + floor(log_10(2*n^2)))))^2.

A290148 a(n) is the integer resulting from the concatenation of the unit digit of n-1 to the digits of n without its own unit digit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 91, 1, 11, 21, 31, 41, 51, 61, 71, 81, 92, 2, 12, 22, 32, 42, 52, 62, 72, 82, 93, 3, 13, 23, 33, 43, 53, 63, 73, 83, 94, 4, 14, 24, 34, 44, 54, 64, 74, 84, 95, 5, 15, 25, 35, 45, 55, 65, 75, 85, 96, 6, 16, 26, 36, 46, 56, 66, 76, 86, 97, 7
Offset: 1

Views

Author

Michel Marcus, Jul 21 2017

Keywords

Comments

Take list of integers n >= 1, move the right-most digit of each term to the start of the next term.
Every number appears, see A381225. - N. J. A. Sloane, Feb 23 2025

Examples

			For n=46, n-1 is 45, so a(46) is the concatenation of 5 (the unit digit of 45) and 4 (46 without 6), giving 54.
For n=123, n-1 is 122, so a(123) is the concatenation of 2 (the unit digit of 122) and 12 (123 without 3), giving 212.
		

Crossrefs

Programs

  • Maple
    f:= n -> (n-1 mod 10) * 10^ilog10(n) + floor(n/10);
  • PARI
    a(n) = my(precd = (n-1)%10); if (n < 10, precd, eval(concat(Str(precd), Str(n\10))));
    
  • Python
    def a(n): return 0 if n == 1 else int(str((n-1)%10)+ str(n)[:-1])
    print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Feb 22 2025

Formula

a(n) = (n-1 mod 10)*10^A004216(n) + floor(n/10). # Robert Israel, Jul 21 2017

A348674 Number of distinct values that can be produced by splitting n and adding the parts.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4
Offset: 0

Views

Author

Alois P. Heinz, Oct 29 2021

Keywords

Comments

Differs from A055642 first at n=120: a(120) = 4 != 3 = A055642(120).
The number of split positions can vary from 0 to length(n)-1.

Examples

			a(0) = 1: 0.
a(10) = 2: 1 = 1+0, 10.
a(100) = 3: 1 = 1+0+0, 10 = 10+0, 100.
a(120) = 4: 3 = 1+2+0, 12 = 12+0, 21 = 1+20, 120.
a(2493690) = 62 = |{33, 51, 60, 69, 78, 87, 96, 105, 114, 123, 132, 141, 150, 159, 168, 177, 186, 195, 213, 267, 294, 321, 348, 375, 384, 402, 420, 510, 564, 591, 618, 708, 726, 744, 789, 807, 942, 951, 969, 1032, 1050, 1185, 2508, 2562, 2589, 3183, 3705, 3723, 3741, 3939, 4947, 5028, 9375, 9393, 24945, 25026, 49371, 93696, 93714, 249369, 493692, 2493690}|.
		

Crossrefs

Ordinal transform gives A349315.
Where records occur: A349316.

Programs

  • Maple
    b:= proc(s) option remember; (n-> {parse(s), seq(seq(seq(x+y,
          y=b(s[i+1..n])), x=b(s[1..i])), i=1..n-1)})(length(s))
        end:
    a:= n-> nops(b(""||n)):
    seq(a(n), n=0..120);

Formula

a(n) <= 2^floor(log_10(n)) = 2^A004216(n) for n>0.
a((10^n-1)/9) = a(A002275(n)) <= A000041(n) with equality only for n <= 23.
a(10^n) = a(A011557(n)) = n+1.

A372523 Triangle read by rows: T(n, k) is equal to n/k if k | n, else to the concatenation of A003988(n, k) = floor(n/k) and A051127(k, n) = n mod k.

Original entry on oeis.org

1, 2, 1, 3, 11, 1, 4, 2, 11, 1, 5, 21, 12, 11, 1, 6, 3, 2, 12, 11, 1, 7, 31, 21, 13, 12, 11, 1, 8, 4, 22, 2, 13, 12, 11, 1, 9, 41, 3, 21, 14, 13, 12, 11, 1, 10, 5, 31, 22, 2, 14, 13, 12, 11, 1, 11, 51, 32, 23, 21, 15, 14, 13, 12, 11, 1, 12, 6, 4, 3, 22, 2, 15, 14, 13, 12, 11, 1
Offset: 1

Views

Author

Stefano Spezia, May 04 2024

Keywords

Examples

			The triangle begins:
  1;
  2,  1;
  3, 11,  1;
  4,  2, 11,  1;
  5, 21, 12, 11,  1;
  6,  3,  2, 12, 11,  1;
  7, 31, 21, 13, 12, 11, 1;
  ...
		

Crossrefs

Cf. A000012 (right diagonal), A000027 (1st column).

Programs

  • Mathematica
    T[n_,k_]:=If[Divisible[n,k],n/k,FromDigits[Join[IntegerDigits[Floor[n/k]],IntegerDigits[Mod[n,k]]]]]; Table[T[n,k],{n,12},{k,n}]//Flatten (* or *)
    T[n_,k_]:=Floor[n/k]10^IntegerLength[Mod[n,k]]+Mod[n,k]; Table[T[n,k],{n,12},{k,n}]//Flatten (* or *)
    T[n_, k_]:=SeriesCoefficient[x^k(1+Sum[(i + 10^(1+Floor[Log10[Mod[n,k]]]))*x^i, {i, k-1}] - Sum[i*x^(k+i), {i, k-1}])/(1-x^k)^2, {x, 0, n}]; Table[T[n, k], {n, 12}, {k, n}]//Flatten

Formula

T(n, k) = floor(n/k)*10^(1+floor(log10(n mod k))) + (n mod k) if n is not divisible by k.
T(n, n) = 1.
T(n, 1) = n.
T(n, k) = 2*T(n-k, k) - T(n-2*k, k) for n >= 3*k.
T(n, k) = [x^n] x^k*(1 + (Sum_{i=1..k-1} (i + 10^(1+floor(log10(n mod k))))*x^i) - (Sum_{i=1..k-1} i*x^(k+i)))/(1 - x^k)^2.

A004225 a(n) = 1000*log_10(n) rounded down.

Original entry on oeis.org

0, 301, 477, 602, 698, 778, 845, 903, 954, 1000, 1041, 1079, 1113, 1146, 1176, 1204, 1230, 1255, 1278, 1301, 1322, 1342, 1361, 1380, 1397, 1414, 1431, 1447, 1462, 1477, 1491, 1505, 1518, 1531, 1544
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Floor[1000 Log10[Range[40]]] (* Harvey P. Dale, May 27 2024 *)

A253445 a(n) = concatenation of n^2 with itself.

Original entry on oeis.org

11, 44, 99, 1616, 2525, 3636, 4949, 6464, 8181, 100100, 121121, 144144, 169169, 196196, 225225, 256256, 289289, 324324, 361361, 400400, 441441, 484484, 529529, 576576, 625625, 676676, 729729, 784784, 841841, 900900, 961961, 10241024, 10891089, 11561156
Offset: 1

Views

Author

Vincenzo Librandi, Jan 02 2015

Keywords

Crossrefs

Programs

  • Magma
    [Seqint(Intseq(n^2) cat Intseq(n^2)): n in [1..40]];
    
  • Maple
    seq(n^2*(1+10^(1+ilog10(n^2))),n=1..100); # Robert Israel, Jan 02 2015
  • Mathematica
    Table[FromDigits[Join[IntegerDigits[n^2], IntegerDigits[n^2]]], {n, 40}]
  • PARI
    vector(100,n,eval(concat(Str(n^2),Str(n^2)))) \\ Derek Orr, Jan 02 2015

Formula

a(n) = A020338(n^2) = n^2 * (1 + 10^(A004216(n^2)+1)).
Previous Showing 11-20 of 29 results. Next