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 21-30 of 31 results. Next

A258080 a(n) = ((n concatenated with n+1) + (n+1 concatenated with n)) mod n*(n+1).

Original entry on oeis.org

1, 1, 5, 19, 1, 17, 53, 43, 29, 31, 79, 29, 179, 199, 11, 69, 169, 317, 139, 361, 185, 497, 331, 149, 601, 439, 263, 73, 739, 581, 411, 229, 35, 1019, 871, 713, 545, 367, 179, 1621, 1495, 1361, 1219, 1069, 911, 745, 571, 389, 199, 1, 2447, 2337, 2221, 2099
Offset: 1

Views

Author

Vladimir Shevelev, May 19 2015

Keywords

Crossrefs

Cf. A001704 (concatenation {n,n+1}).

Programs

  • Mathematica
    Map[Mod[FromDigits[Flatten[{#1,#2}]]+FromDigits[Flatten[{#2,#1}]]&[IntegerDigits[#+1],IntegerDigits[#]],# (#+1)]&,Range[100]] (*Peter J. C. Moses, May 19 2015*)
    Mod[(#[[1]]*10^IntegerLength[#[[2]]]+#[[2]])+(#[[2]]*10^IntegerLength[#[[1]]]+#[[1]]),Times@@#]&/@Partition[Range[60],2,1] (* Harvey P. Dale, Jul 21 2025 *)
  • PARI
    a(n) = (eval(concat(Str(n), Str(n+1))) + eval(concat(Str(n+1), Str(n)))) % (n*(n+1)); \\ Michel Marcus, Jun 04 2015

Extensions

More terms from Peter J. C. Moses, May 19 2015

A287747 Concatenation {n, n + 1,.., n + 9}.

Original entry on oeis.org

12345678910, 234567891011, 3456789101112, 45678910111213, 567891011121314, 6789101112131415, 78910111213141516, 891011121314151617, 9101112131415161718, 10111213141516171819, 11121314151617181920, 12131415161718192021, 13141516171819202122, 14151617181920212223
Offset: 1

Views

Author

XU Pingya, Jun 01 2017

Keywords

Comments

For the position of primes in this sequence, see A287244.

Crossrefs

Programs

  • Mathematica
    A287747[n_] := FromDigits[Flatten[IntegerDigits[Range[n, n + 9]]]];
    Array[A287747, 25] (* Paolo Xausa, Aug 26 2024 *)

A298156 Composite numbers n of which the sum of prime divisors of n (with repetition) equals the concatenation of two integers k and k + 1.

Original entry on oeis.org

35, 42, 50, 60, 64, 72, 76, 81, 86, 93, 136, 145, 153, 159, 164, 174, 253, 273, 289, 325, 365, 385, 390, 416, 438, 462, 468, 488, 494, 497, 549, 550, 555, 559, 592, 644, 658, 660, 664, 666, 686, 703, 704, 710, 737, 747, 792, 836, 852, 884, 885, 891, 920, 940, 944, 946, 980
Offset: 1

Views

Author

Daniel Blaine McBride, Jan 13 2018

Keywords

Comments

Composite numbers n, of which A001414(n) (sum of prime divisors of n with repetition, sopfr(n)) is in sequence A001704 (numbers m which are the concatenation of k and k+1).

Examples

			35 = 5*7, sopfr(35) = 5+7 = 12, 12 =k||k+1 when k = 1.
		

Crossrefs

Cf. A001414 (sum of prime divisors of n with repetition, sopfr(n)).
Cf. A001704 (numbers which are the concatenation of k and k+1).

Programs

  • Mathematica
    Select[Range[10^3], And[CompositeQ@ #, Subtract @@ Map[FromDigits, TakeDrop[#, Floor[Length[#]/2]]] == -1 &@ IntegerDigits@ Total[Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger[#]]]] &] (* Michael De Vlieger, Jan 14 2018 *)
  • PARI
    is(n)=my(f = factor(n), sopfr = sum(i = 1, #f~, f[i, 1] * f[i, 2]); d = digits(sopfr), v); if((#d) % 2 == 0, v = vector(#d / 2); v[#v] = -1; return(vector(#d / 2, j, d[j]) - vector(#d / 2, #d / 2 + j, d[j]) == v), return(d == concat(digits(10^(#d \ 2) - 1), digits(10^(#d \ 2))))) \\ David A. Corneth, Jan 13 2018
    
  • PARI
    sopfr(n,f=factor(n))=sum(i=1,#f~, f[i,1]*f[i,2])
    has(n)=my(d=digits(n),k=#d); digits(fromdigits(d[1..k\2])+1) == d[k\2+1..k]
    list(lim)=my(v=List()); forfactored(n=35,lim\1, if(n[2][,2]!=[1]~ && has(sopfr(0,n[2])), listput(v,n[1]))); Vec(v) \\ Charles R Greathouse IV, Jan 15 2018

Formula

sopfr(n) = k||k+1 when n is not prime and k is a positive integer.

A333359 Variation of Van Eck's sequence A181391: a(n+1) = the minimum positive offset m from a(n) such that the decimal concatenation of a(n-m), a(n-m+1), ..., a(n-m+k) = a(n), where k >= 0; a(n+1)=0 if no such m exists. Start with a(1)=0.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 2, 2, 1, 6, 0, 5, 0, 2, 6, 5, 4, 0, 5, 3, 0, 3, 2, 9, 0, 4, 9, 3, 6, 14, 0, 6, 3, 5, 15, 0, 5, 3, 5, 2, 17, 0, 6, 11, 0, 3, 8, 0, 3, 3, 1, 42, 0, 5, 15, 20, 51, 0, 5, 5, 1, 10, 59, 0, 6, 22, 59, 4, 42, 17, 29, 48, 0, 9, 47, 0, 3, 27, 0, 3, 3, 1, 21, 75, 0, 6
Offset: 1

Views

Author

Scott R. Shannon, Mar 16 2020

Keywords

Comments

The terms up to a(56) are the same as A181391 but vary from a(57) and beyond. After 10000 terms the smallest number not appearing is 332.

Examples

			a(42) = 0 as a(41) = 17, and neither '17' or adjacent sequence terms '1' and '7' appear earlier in the sequence.
a(57) = 51 as a(56) = 20, and the value '20' is the concatenation of a(5) = 2 and a(6) = 0, and a(5) is fifty-one terms back from a(56).
		

Crossrefs

A371144 The smallest number such that the concatenation of n, a(n), n+1 is divisible by the concatenation of n and n+1.

Original entry on oeis.org

3, 5, 7, 0, 37, 76, 48, 98, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 560, 571, 582, 593, 604, 615, 626, 637, 648, 361, 670, 681, 692, 703, 714, 725, 736, 747, 758, 769, 780
Offset: 1

Views

Author

Scott R. Shannon, Mar 12 2024

Keywords

Comments

For n > 10, when n starts with the digits 1, 2, 3, or 4, then a(n) = 2*n + 1. When n starts with the digits 5, 6, 7, or 8, then a(n) = 11*n + 10 for the vast majority of terms, although some outliers exist e.g., a(749) = 2251. When n starts with the digit 9, the values are somewhat more varied.
The maximum possible value for any term is the concatenation of n+1 and n, see the example for a(6) below. However except for a(6) and a(8), for the terms studied this only occurs four times for every order of magnitude increase in n, namely the four numbers consisting of all 9's except for the final digit of 0, 2, 6, or 8.
The first duplicate term is a(5) = a(18) = 37. There are 234 duplicates in the first 10000 terms.

Examples

			a(1) != 1 as "1"+"1"+"2" = 112 is not divisible by "1"+"2" = 12.
a(1) != 2 as "1"+"1"+"2" = 122 is not divisible by "1"+"2" = 12.
a(1) = 3 as "1"+"3"+"2" = 132 is divisible by "1"+"2" = 12.
a(5) = 37 as "5"+"37"+"6" = 5376 is divisible by "5"+"6" = 56.
a(6) = 76 as "6"+"76"+"7" = 6767 is divisible by "6"+"7" = 67. This is the first time the maximum possible value is required.
		

Crossrefs

A381918 Kaprekar numbers that are the concatenation of two consecutive numbers.

Original entry on oeis.org

45, 2223, 2728, 4950, 148149, 351352, 499500, 11111112, 38883889, 49995000, 63636364, 74747475, 75247525, 86358636, 4756047561, 4999950000, 5867158672, 6111061111, 8888888889, 9132791328, 104247104248, 164983164984, 178321178322, 195156195157, 230769230770, 269230269231
Offset: 1

Views

Author

Shyam Sunder Gupta, Mar 10 2025

Keywords

Comments

Since all numbers 4950, 449500, 49995000, ... are Kaprekar numbers, there are infinitely many terms.

Examples

			If the number 351 is concatenated with the next number, 352, we get a Kaprekar number, 351352. It can be verified that 351352^2 = 123448227904, and 123448 + 227904 = 351352.
		

Crossrefs

Intersection of A006886 and A001704.
Cf. A030466.

A259747 a(0) = 1; thereafter a(n) is the concatenation of a(n-1), n, a(n-1).

Original entry on oeis.org

1, 111, 1112111, 111211131112111, 1112111311121114111211131112111, 111211131112111411121113111211151112111311121114111211131112111
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    concatPal[0] = 1; concatPal[n_] := FromDigits @ Join[RealDigits[concatPal[n - 1]][[1]], {n}, RealDigits[concatPal[n - 1]][[1]]]; Table[concatPal[n], {n, 0, 10}]
    nxt[{n_,a_}]:={n+1,FromDigits[Flatten[Join[IntegerDigits[a], IntegerDigits[ n+1], IntegerDigits[ a]]]]}; NestList[nxt,{0,1},5][[All,2]] (* Harvey P. Dale, Apr 30 2020 *)
  • PARI
    main(size) = {s=vector(size); s[1]=1; for(t=2,size,s[t]= eval(Str(s[t-1],t-1,s[t-1]))); return(s);} \\ Anders Hellström, Jul 05 2015

Formula

a(1)=1 and a(n) = a(n - 1)*10^(2^n) + n *10^(2^n - 1) + a(n - 1).

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

Original entry on oeis.org

1, 10, 23, 32, 45, 54, 67, 76, 89, 98, 1011, 1110, 1213, 1312, 1415, 1514, 1617, 1716, 1819, 1918, 2021, 2120, 2223, 2322, 2425, 2524, 2627, 2726, 2829, 2928, 3031, 3130, 3233, 3332, 3435, 3534, 3637, 3736, 3839, 3938, 4041, 4140, 4243, 4342, 4445, 4544, 4647, 4746, 4849, 4948, 5051, 5150, 5253, 5352, 5455, 5554
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 21 2016

Keywords

Comments

Concatenation of n with n+(-1)^n (A004442).
Subsequence of A248378.
Primes in this sequence: 23, 67, 89, 1213, 3637, 4243, 5051, 5657, 6263, 6869, 7879, 8081, 9091, 9293, 9697, 102103, ... (A030458).
Numbers n such that a(n) is prime: 2, 6, 8, 12, 36, 42, 50, 56, 62, 68, 78, 80, 90, 92, 96, 102, 108, 120, 126, 138, ... (A030457).

Examples

			a(0) =  0 + 1 = 1;
a(1) = 11 - 1 = 10;
a(2) = 22 + 1 = 23;
a(3) = 33 - 1 = 32;
a(4) = 44 + 1 = 45;
a(5) = 55 - 1 = 54, etc.
or
a(0) =  1 -> concatenation of 0 with 0 + (-1)^0 = 1;
a(1) = 10 -> concatenation of 1 with 1 + (-1)^1 = 0;
a(2) = 23 -> concatenation of 2 with 2 + (-1)^2 = 3;
a(3) = 32 -> concatenation of 3 with 3 + (-1)^3 = 2;
a(4) = 45 -> concatenation of 4 with 4 + (-1)^4 = 5;
a(5) = 54 -> concatenation of 5 with 5 + (-1)^5 = 4, etc.
........................................................
a(2k) = 1, 23, 45, 67, 89, 1011, 1213, 1415, 1617, 1819, ...
		

Crossrefs

Programs

  • Mathematica
    Table[n (10^Floor[Log[10, n] + 1] + 1) + (-1)^n, {n, 0, 55}]
  • PARI
    a(n) = if(n, n*(10^(logint(n,10)+1) + 1) + (-1)^n, 1) \\ Charles R Greathouse IV, Jul 21 2016

Formula

a(n) = A020338(n) + A033999(n).
a(2k) = A030656(k).
A064834(a(n)) > 0, for n > 0.
a(n) ~ 10*n*10^floor(c*log(n)), where c = 1/log(10) = 0.4342944819... = A002285.

A333358 a(1) = 0. For n>1, a(n+1) = the minimum positive m such that the concatenation of the decimal values [a(n-m),a(n-m+1),...,a(n-m+k)] equals a(n) for some k>=0; a(n+1) = a(n) + 1 if no such m exists.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 2, 12, 3, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, 1, 38, 39, 40, 41, 42, 43, 44, 45, 43, 3, 33, 14, 33, 2, 39, 13, 38, 16, 37, 38, 3, 11, 48, 49, 50, 51, 52, 53, 54, 55, 56, 65, 66, 67, 67, 1, 36
Offset: 1

Views

Author

Scott R. Shannon, Mar 16 2020

Keywords

Examples

			a(n) = n-1 for 2 <= n <= 13 as a(1) = 0 and no choice for a(n) equals the concatenation of one or more previous terms, so a(n) = a(n-1) + 1 = n-1.
a(14) = 11 as a(13) = 12, and the value '12' is the concatenation of a(2) = 1 and a(3) = 2, and a(2) is eleven terms back from a(13).
a(15) = 2 as a(14) = 11, and the value '11' is a(12), which is two terms back from a(14).
		

Crossrefs

A340231 Numbers of the form m^2-4 and also equal to some k concatenated with k+1.

Original entry on oeis.org

12, 45, 2021, 3132, 1456414565, 3823938240, 6991969920, 120395120396, 426436426437, 902596902597, 74780207478021, 90902209090221, 66713320846671332085, 81142640598114264060, 84822272598482227260, 99002509969900250997, 22443387868362244338786837, 24905771529642490577152965
Offset: 1

Views

Author

Bernard Schott, Jan 01 2021

Keywords

Comments

All the terms have an even number of digits, but there is no term with 6, 8, 16, 18, 22, 24, ... digits.
The values of m are A115439, because a(n) = m^2-4 and a(n) = k|k+1 <==> a(n)+4 = m^2 and a(n)+4 = k|k+5 <==> m^2 = k|k+5, where | denotes concatenation.
a(3) = 2021 = 43*47 is A143206(6), the product of a cousin prime pair.
The next such term is A115439(1062)^2 - 4. - David A. Corneth, Jan 02 2021

Examples

			a(1) = 12 = 4^2-4 = 2*6.
a(4) = 3132 = 56^2-4 = 54*58.
		

Crossrefs

Intersection of A001704 and A028347.

Programs

  • Mathematica
    Select[Table[n 10^IntegerLength[n]+n+1,{n,10^6}],IntegerQ[Sqrt[#+4]]&] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Dec 27 2022 *)
  • Python
    def agen():
      m = 4
      while True:
        tstr = str(m*m-4)
        k = int(tstr[:len(tstr)//2])
        if tstr == str(k) + str(k+1):
          yield(int(tstr))
        m += 1
    for an in agen(): print(an, end=", ") # Michael S. Branicky, Jan 02 2021

Extensions

a(13)-a(16) from Michael S. Branicky, Jan 02 2021
a(17)-a(18) from David A. Corneth, Jan 02 2021
Previous Showing 21-30 of 31 results. Next