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-4 of 4 results.

A128858 Number of digits in A128857(n).

Original entry on oeis.org

1, 18, 28, 6, 42, 58, 22, 13, 44, 2, 108, 48, 21, 46, 148, 13, 78, 178, 6, 99, 18, 8, 228, 7, 41, 6, 268, 15, 272, 66, 34, 28, 138, 112, 116, 179, 5, 378, 388, 18, 204, 418, 6, 219, 32, 48, 66, 239, 81, 498, 508, 43, 506, 42, 60, 42, 284, 192, 90, 299, 84, 618, 48, 35
Offset: 1

Views

Author

Anton V. Chupin (chupin(X)icmm.ru), Apr 12 2007

Keywords

Crossrefs

Cf. A128857.

Programs

  • Mathematica
    Give[a_,n_]:=Block[{d=Floor[Log[10,n]]+1,m=(10n-1)/GCD[10n-1,a]}, If[m?1,While[PowerMod[10,d,m]!=N,d++ ],d=1]; ((10^(d+1)-1) a n)/(10n-1)]; Length[IntegerDigits[Give[1,n]]]
  • Python
    from sympy import n_order
    def A128858(n): return n_order(10,10*n-1) # Chai Wah Wu, Apr 09 2024

Formula

a(n) = order of 10 (mod 10*n - 1). - Arkadiusz Wesolowski, Nov 17 2012

Extensions

a(10) = 2 corrected by Gerard P. Michon, Oct 31 2012

A097717 a(n) = least number m such that the quotient m/n is obtained merely by shifting the leftmost digit of m to the right end.

Original entry on oeis.org

1, 105263157894736842, 1034482758620689655172413793, 102564, 714285, 1016949152542372881355932203389830508474576271186440677966, 1014492753623188405797, 1012658227848, 10112359550561797752808988764044943820224719
Offset: 1

Views

Author

Lekraj Beedassy, Sep 21 2004

Keywords

Examples

			We have a(5)=714285 since 714285/5=142857.
Likewise, a(4)=102564 since this is the smallest number followed by 205128, 307692, 410256, 512820, 615384, 717948, 820512, 923076, ... which all get divided by 4 when the first digit is made last.
		

References

  • R. Sprague, Recreation in Mathematics, Problem 21 pp. 17; 47-8 Dover NY 1963.

Crossrefs

A097717: when move L digit to R, divides by n (infinite)
A094676: when move L digit to R, divides by n, no. of digits is unchanged (finite)
A092697: when move R digit to L, multiplies by n (finite)
A128857 is the same sequence as A097717 except that m must begin with 1.
Not the same as A092697.
Cf. A249596 - A249599 (bases 2 to 5).

Programs

  • Mathematica
    Min[Table[Block[{d=Ceiling[Log[10,n]],m=(10n-1)/GCD[10n-1,a]}, If[m!=1, While[PowerMod[10,d,m]!=n,d++ ],d=1]; ((10^(d+1)-1) a n)/(10n-1)], {a,9}]] (* Anton V. Chupin (chupin(X)icmm.ru), Apr 12 2007 *)

Extensions

a(9) from Anton V. Chupin (chupin(X)icmm.ru), Apr 12 2007
Code and b-file corrected by Ray Chandler, Apr 29 2009

A092697 For 1 <= n <= 9, a(n) = least number m such that the product n*m is obtained merely by shifting the rightmost digit of m to the left end (a finite sequence).

Original entry on oeis.org

1, 105263157894736842, 1034482758620689655172413793, 102564, 142857, 1016949152542372881355932203389830508474576271186440677966, 1014492753623188405797, 1012658227848, 10112359550561797752808988764044943820224719
Offset: 1

Views

Author

Lekraj Beedassy, Aug 21 2004; corrected Dec 17 2004

Keywords

Comments

This is the least n-parasitic number. A k-parasitic number (where 1 <= k <= 9) is one such that when it is multiplied by k, the product obtained is merely its rightmost digit transferred in front at the leftmost end.

Examples

			102564 is 4-parasitic because we have 102564*4=410256.
For n=5: 142857*5=714285. [Dzmitry Paulenka (pavlenko(AT)tut.by), Aug 09 2009]
		

References

  • C. A. Pickover, Wonders of Numbers, Chapter 28, Oxford Univ. Press UK 2000.

Crossrefs

For other sequences with the same start, see A128857 and especially the cross-references in A097717.

Extensions

Edited by N. J. A. Sloane, Apr 13 2009
Corrected to set 5th term to 142857 as this is the least 5-parasitic number. Dzmitry Paulenka (pavlenko(AT)tut.by), Aug 09 2009
a(9) added by Ian Duff, Jan 03 2012
Incorrect formula removed by Alois P. Heinz, Feb 18 2020

A366494 a(n) is the number of cycles of the map f(x) = 10*x mod (10*n - 1).

Original entry on oeis.org

8, 1, 1, 8, 2, 1, 5, 6, 2, 53, 1, 4, 8, 3, 1, 14, 4, 1, 41, 2, 16, 29, 1, 34, 8, 49, 1, 26, 2, 7, 11, 16, 4, 5, 3, 2, 80, 1, 1, 26, 2, 1, 83, 2, 14, 29, 9, 2, 8, 1, 1, 14, 2, 27, 17, 16, 2, 5, 9, 2, 14, 1, 25, 26, 16, 1, 5, 8, 14, 5, 1, 2, 32, 3, 5, 50, 4, 17, 5, 4, 4, 143
Offset: 1

Views

Author

Hillel Wayne, Oct 10 2023

Keywords

Comments

Taking the length of each orbit that starts from f(0)=1 gives the sequence A128858.
Equivalently, the number of cyclotomic cosets of 10 mod (10*n - 1). See A006694.
Map is the Multiply-with-carry algorithm with a=n, b=10, and c=1.

Examples

			For a(4) the 8 cycles are:
  (1 10 22 25 16 4)
  (2 20 5 11 32 8)
  (3 30 27 36 9 12)
  (6 21 15 33 18 24)
  (7 31 37 19 34 28)
  (13)
  (14 23 35 38 29 17)
  (26)
		

Crossrefs

Programs

  • PARI
    a(n)=sumdiv(10*n-1, d, eulerphi(d)/znorder(Mod(10, d)))-1;
    vector(100, n, a(n-1)) \\ Joerg Arndt, Jan 22 2024
  • Python
    def get_num_orbits(n: int) -> int:
        orbits = 0
        mod = 10*n - 1
        seen = set()
        for i in range(1, mod):
            if i not in seen:
                seen.add(i)
                orbits += 1
            x = 10*i % mod
            while x != i:
                seen.add(x)
                x = 10*x % mod
        return orbits
    
  • Python
    from sympy import totient, n_order, divisors
    def A366494(n): return sum(totient(d)//n_order(10,d) for d in divisors(10*n-1,generator=True) if d>1) # Chai Wah Wu, Apr 09 2024
    
Showing 1-4 of 4 results.