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-10 of 18 results. Next

A368879 Primes that are in A070196.

Original entry on oeis.org

2, 11, 101, 233, 277, 409, 499, 521, 547, 587, 607, 617, 631, 659, 661, 677, 719, 727, 739, 743, 751, 769, 773, 787, 809, 827, 829, 839, 859, 863, 881, 883, 919, 929, 941, 953, 971, 991, 997, 1009, 1021, 1031, 1049, 1051, 1061, 1063, 1069, 1087, 1103, 1109, 1151, 1163, 1171, 1181, 1187, 1193
Offset: 1

Views

Author

Robert Israel, Jan 15 2024

Keywords

Comments

Primes p such that for some k, p = k + the sorted version of the base-10 digits of k.

Examples

			a(4) = 233 is a term because 233 = A070196(121) = 121 + 112 is prime.
a(5) = 277 is a term in three ways: 277 = 143 + 134 = 152 + 125 = 161 + 116.
		

Crossrefs

Cf. A070196.

Programs

  • Maple
    f:= proc(n) local L,i;
        L:= sort(convert(n,base,10),`>`);
        add(L[i]*10^(i-1),i=1..nops(L)) + n;
    end proc:
    select(t -> t < 10000 and isprime(t), map(f, {$1..9999}));
  • Python
    from sympy import isprime
    def aupto(LIMIT):
        cands = set(k + int("".join(sorted(str(k)))) for k in range(LIMIT))
        return sorted(k for k in cands if k <= LIMIT and isprime(k))
    print(aupto(1200)) # Michael S. Branicky, Jan 15 2024

A033860 Sort-then-add sequence: a(n+1) = a(n) + sort(a(n)).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 55, 110, 121, 233, 466, 932, 1171, 2288, 4576, 9143, 10492, 11741, 22888, 45776, 91453, 104912, 116161, 227327, 449704, 494183, 628672, 855350, 890908, 899807, 978706, 1046495, 1191064, 1302533, 1425868, 2671556, 3927223, 6150602, 6163168
Offset: 1

Views

Author

Keywords

Examples

			After 9143 the next term is 9143 + 1349 = 10492.
		

Crossrefs

Programs

  • Haskell
    a033860 n = a033860_list !! (n-1)
    a033860_list = iterate a070196 1
    -- Reinhard Zumkeller, Apr 03 2015
    
  • Maple
    a:= proc(n) option remember; `if`(n=1, 1, (t->
          t+parse(cat(sort(convert(t, base, 10))[])))(a(n-1)))
        end:
    seq(a(n), n=1..40);  # Alois P. Heinz, Jan 15 2024
  • Mathematica
    NestList[#+FromDigits[Sort[IntegerDigits[#]]]&,1,40] (* Harvey P. Dale, Jul 24 2016 *)
  • Python
    from itertools import islice
    def agen(an=1): # generator of terms
        while True: yield an; an = an + int("".join(sorted(str(an))))
    print(list(islice(agen(), 100))) # Michael S. Branicky, Jan 15 2024

Formula

a(n+1) = A070196(a(n)). - Reinhard Zumkeller, Apr 03 2015

A033896 Sort then Add, a(1) =9.

Original entry on oeis.org

9, 18, 36, 72, 99, 198, 387, 765, 1332, 2565, 5121, 6246, 8712, 9990, 10989, 12888, 25776, 51453, 64908, 69597, 126396, 250065, 252621, 374877, 722655, 948222, 1170711, 1281888, 2410776, 2535453, 4870008, 4874796, 9342585, 11688174, 22834962, 45069651
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A033896 := proc(n)
        option remember ;
        if n =1 then
            9;
        else
            A070196(procname(n-1)) ;
        end if;
    end proc:
    seq(A033896(n),n=1..100) ; # R. J. Mathar, Feb 03 2025
  • Mathematica
    NestList[FromDigits[Sort[IntegerDigits[#]]]+#&,9,40] (* Harvey P. Dale, Aug 19 2014 *)
  • Python
    from itertools import accumulate
    def sta(anm1, _): return anm1 + int("".join(sorted(str(anm1))))
    print(list(accumulate([9]*36, sta))) # Michael S. Branicky, Sep 18 2021

A033898 Sort then Add, a(1)=15.

Original entry on oeis.org

15, 30, 33, 66, 132, 255, 510, 525, 780, 858, 1446, 2892, 5181, 6339, 9708, 10497, 11976, 23655, 47211, 58458, 104046, 105492, 117951, 229530, 251889, 377778, 755556, 1311123, 2422356, 4645812, 5890380, 5926269, 8182968, 9451857, 10907646
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A033860.

Programs

A033902 Sort then Add, a(1)=25.

Original entry on oeis.org

25, 50, 55, 110, 121, 233, 466, 932, 1171, 2288, 4576, 9143, 10492, 11741, 22888, 45776, 91453, 104912, 116161, 227327, 449704, 494183, 628672, 855350, 890908, 899807, 978706, 1046495, 1191064, 1302533, 1425868, 2671556, 3927223, 6150602
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A033860.

Programs

A033905 Sort then Add, a(1)=31.

Original entry on oeis.org

31, 44, 88, 176, 343, 677, 1354, 2699, 5398, 8987, 16876, 33554, 67009, 67688, 134476, 268943, 503632, 526988, 783877, 1161665, 2277331, 3500708, 3504286, 3738854, 7084642, 7329320, 7552699, 10109498, 10224397, 11447876, 22894654, 45340343
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A033860.

Programs

  • Maple
    A033905 := proc(n)
        option remember ;
        if n =1 then
            31;
        else
            A070196(procname(n-1)) ;
        end if;
    end proc:
    seq(A033905(n),n=1..100) ; # R. J. Mathar, Feb 03 2025
  • Mathematica
    NestList[#+FromDigits[Sort[IntegerDigits[#]]]&,31,40] (* Harvey P. Dale, Jul 19 2017 *)

A033893 Sort then Add, a(1)=3.

Original entry on oeis.org

3, 6, 12, 24, 48, 96, 165, 321, 444, 888, 1776, 3453, 6798, 13587, 27165, 39732, 63111, 74247, 98724, 123513, 235848, 470436, 504903, 508362, 531930, 545289, 790878, 868767, 1536555, 2892111, 4004400, 4004844, 4049292, 4273791, 5508570, 5564148, 7009716
Offset: 1

Views

Author

Keywords

Comments

a(n+1) is obtained by sorting the digits of a(n) into increasing order then adding this number to a(n).

Examples

			96 + 69 = 165.
		

Crossrefs

Cf. A033860.

Programs

A033894 Sort then Add, a(1)=5.

Original entry on oeis.org

5, 10, 11, 22, 44, 88, 176, 343, 677, 1354, 2699, 5398, 8987, 16876, 33554, 67009, 67688, 134476, 268943, 503632, 526988, 783877, 1161665, 2277331, 3500708, 3504286, 3738854, 7084642, 7329320, 7552699, 10109498, 10224397, 11447876
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A033860.

Programs

  • Maple
    A033894 := proc(n)
        option remember ;
        if n =1 then
            5;
        else
            A070196(procname(n-1)) ;
        end if;
    end proc:
    seq(A033894(n),n=1..100) ; # R. J. Mathar, Feb 03 2025
  • Mathematica
    NestList[#+FromDigits[Sort[IntegerDigits[#]]]&,5,40] (* Harvey P. Dale, Dec 31 2015 *)

A033895 Sort then Add, a(1)=7.

Original entry on oeis.org

7, 14, 28, 56, 112, 224, 448, 896, 1585, 3143, 4477, 8954, 13543, 26888, 53776, 89453, 124042, 136286, 259954, 505553, 541108, 552566, 808132, 820520, 822778, 1050566, 1066132, 1178498, 2326387, 4560065, 4605631, 4740197, 4884976, 9352865
Offset: 1

Views

Author

Keywords

Examples

			1585 --> 1558 (sorted) and adding them gives 1585+1558 = 3143.
		

Crossrefs

Cf. A033860.

Programs

A033897 Sort then Add, a(1)=13.

Original entry on oeis.org

13, 26, 52, 77, 154, 299, 598, 1187, 2365, 4721, 5968, 11657, 23224, 45458, 90016, 90185, 91774, 106553, 120109, 121238, 233476, 466943, 811612, 922880, 945769, 1402568, 1527136, 2650703, 2674270, 2898947, 5377846, 8834624, 11179312
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A033860.

Programs

  • Maple
    A033897 := proc(n)
        option remember ;
        if n =1 then
            13;
        else
            A070196(procname(n-1)) ;
        end if;
    end proc:
    seq(A033897(n),n=1..100) ; # R. J. Mathar, Feb 03 2025
  • Mathematica
    NestList[#+FromDigits[Sort[IntegerDigits[#]]]&,13,40] (* Harvey P. Dale, Sep 09 2012 *)
Showing 1-10 of 18 results. Next