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.

A353025 Terms of A352991 which are perfect powers.

Original entry on oeis.org

1, 13527684, 34857216, 65318724, 73256481, 81432576, 139854276, 152843769, 157326849, 215384976, 245893761, 254817369, 326597184, 361874529, 375468129, 382945761, 385297641, 412739856, 523814769, 529874361, 537219684, 549386721, 587432169, 589324176, 597362481, 615387249, 627953481, 653927184
Offset: 1

Views

Author

Marco Ripà, Apr 17 2022

Keywords

Comments

It appears that all terms are terms of A062503.
We note that a(n)=A352329(n) up to a(36)=A352329(36)=923187456, while the mentioned match does not hold starting from a(37)=14102987536 (since A352329(37)=1234608769).
There are no perfect powers among terms t which are permutations of 123_...(m - 1)_m for m == {2, 3, 5, 6} (mod 9). This is since 10 == 1 (mod 9) and also (1 + 0) == 1 (mod 9), so digit position has no effect. Hence, t == A134804(m) (mod 9). Now, if m is such that A134804(m) = {3, 6}, there is a lone factor of 3, which is not a perfect power (indeed).
Therefore, all terms are necessarily congruent modulo 9 to 0 or 1 (see Marco Ripà link).
All terms up to 10^34 are squares (in particular, there are 67 squares with no more than 17 digits). - Aldo Roberto Pessolano, May 12 2022

Examples

			75910168324 is a term since 75910168324 = 275518^2.
		

Crossrefs

Programs

  • Mathematica
    z = 1; Do[r = Range[k];
    n = ToExpression[StringJoin[ToString[#] & /@ r]];
    If[And[Mod[n, 9] != 3, Mod[n, 9] != 6], d = DigitCount[n];
      s = IntegerPart[Sqrt[10^(IntegerLength[n] - 1)]];
      f = IntegerPart[Sqrt[10^(IntegerLength[n])]];
      Do[y = x^2;
       If[DigitCount[y] == d, c = True;
        Do[If[Not[StringContainsQ[ToString[y], ToString[i]]],
          c = False], {i, 10, k}]; If[c, Print[z, " ", y]; z++]], {x, s,
        f}]], {k, 1, 10}] (* Aldo Roberto Pessolano, May 12 2022 *)

Formula

Digit sum of a(n) is always congruent to 0 or 1 modulo 9.
a(n) = m^2, where the integer m := m(n) is not a perfect power itself (conjectured).

A030299 Decimal representation of permutations of lengths 1, 2, 3, ... arranged lexicographically.

Original entry on oeis.org

1, 12, 21, 123, 132, 213, 231, 312, 321, 1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142, 3214, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312, 4321, 12345, 12354, 12435, 12453, 12534, 12543, 13245, 13254, 13425
Offset: 1

Views

Author

Keywords

Comments

This is a list of the permutations in "one-line" notation (cf. Dixon and Mortimer, p. 2). The i-th element of the string is the image of i under the permutation. For example 231 is the permutation that sends 1 to 2, 2 to 3, and 3 to 1. - N. J. A. Sloane, Apr 12 2014
Precise definition of the term "Decimal representation" (required for indices n>409113): Numbers N(s) = Sum_{i=1..m} s(i)*10^(m-i), where s runs over the permutations of (1,...,m), and m=1,2,3,.... This also defines the "lexicographical" order: Obviously 21 comes before 123, etc. The lexicographical order of the permutations, for given m, is the same as the natural order of the numbers N(s). - M. F. Hasler, Jan 28 2013
An alternate variant, using concatenation of the permutations, is very clumsy once the length exceeds 9. For example, after 987654321 (= A030299(409113), where 409113 = A007489(9)) we would get 12345678910, 12345678109, ... In A030298 this problem has been avoided by listing the elements of permutations as separate terms. [Edited by M. F. Hasler, Jan 28 2013]
Sequence A051845 is a base-independent version of this sequence: Permutations of 1...m are considered as numbers written in base m+1. - M. F. Hasler, Jan 28 2013

References

  • John D. Dixon and Brian Mortimer, Permutation groups. Graduate Texts in Mathematics, 163. Springer-Verlag, New York, 1996. xii+346 pp. ISBN: 0-387-94599-7 MR1409812 (98m:20003).

Crossrefs

A007489(n) gives the position (index) of the term corresponding to last permutation of n elements: (n,n-1,...,1).
The first differences A220664 has interesting fractal structure, see A219664 and A217626.
Cf. also A030298, A055089, A060117, A181073, A352991 (by concatenation).
See A240763 for preferential arrangements.

Programs

  • Maple
    seq(seq(add(s[i]*10^(m-i),i=1..m),s=combinat:-permute([$1..m])),m=1..5); # Robert Israel, Oct 14 2015
  • Mathematica
    Flatten @ Table[FromDigits /@ Permutations[Table[i,{i,n}]],{n,9}] (* For first 409113 terms; Zak Seidov, Oct 03 2015 *)
  • PARI
    is_A030299(n)={ (n>1234567890 & print("maybe")) || vecsort(digits(n))==vector(#Str(n),i,i) } \\ /* use digits(n)=eval(Vec(Str(n))) in older versions lacking this function */ \\ M. F. Hasler, Dec 12 2012
    (MIT/GNU Scheme)
    ;; Antti Karttunen, Dec 18 2012
    ;; Requires also code from A030298 and A055089:
    (define (A030299 n) (vector->base-k (A030298permvec (A084556 n) (A220660 n)) 10))
    (define (vector->base-k vec k) (let loop ((i 0) (s 0)) (cond ((= (vector-length vec) i) s) ((>= (vector-ref vec i) k) (error (format #f "Cannot interpret vector ~a in base ~a!" vec k))) (else (loop (+ i 1) (+ (* k s) (vector-ref vec i)))))))
    
  • Python
    from itertools import permutations
    def pmap(s, m): return sum(s[i-1]*10**(m-i) for i in range(1, len(s)+1))
    def agen():
      m = 1
      while True:
        for s in permutations(range(1, m+1)): yield pmap(s, m)
        m += 1
    def aupton(terms):
      alst, g = [], agen()
      while len(alst) < terms: alst += [next(g)]
      return alst
    print(aupton(42)) # Michael S. Branicky, Jan 12 2021

Extensions

Edited by N. J. A. Sloane, Feb 23 2010

A001292 Concatenations of cyclic permutations of initial positive integers.

Original entry on oeis.org

1, 12, 21, 123, 231, 312, 1234, 2341, 3412, 4123, 12345, 23451, 34512, 45123, 51234, 123456, 234561, 345612, 456123, 561234, 612345, 1234567, 2345671, 3456712, 4567123, 5671234, 6712345, 7123456
Offset: 1

Views

Author

R. Muller

Keywords

Comments

Entries are sorted numerically, so after a(45) = 912345678 we have a(46) = 10123456789 instead of a(46) = 12345678910. - Giovanni Resta, Mar 21 2017
From Marco Ripà, Apr 21 2022: (Start)
In 1996, Kenichiro Kashihara conjectured that there is no prime power of an integer (A093771) belonging to this sequence (disregarding the trivial case 1); a direct search from 12 to a(100128) has confirmed the conjecture up to 10^1035. There are no perfect powers among terms t which are permutations of 123_...(m - 1)_m for m == {2, 3, 5, 6} (mod 9). This is since 10 == 1 (mod 9) and also (1 + 0) == 1 (mod 9), so digit position has no effect. Hence, t == A134804(m) (mod 9). Now, if m is such that A134804(m) = {3, 6}, there is a lone factor of 3, which is not a perfect power (indeed).
Therefore, any perfect power in this sequence is necessarily congruent modulo 9 to 0 or 1.
(End)

Crossrefs

Programs

  • Mathematica
    Sort@ Flatten@ Table[ FromDigits[ Join @@ IntegerDigits /@ RotateLeft[Range[n], i - 1]], {n, 11}, {i, n}] (* Giovanni Resta, Mar 21 2017 *)
  • Python
    from itertools import count, islice
    def A001292gen():
        s = []
        for i in count(1):
            s.append(str(i))
            yield from sorted(int("".join(s[j:]+s[:j])) for j in range(i))
    print(list(islice(A001292gen(), 46))) # Michael S. Branicky, Jul 01 2022
Showing 1-3 of 3 results.