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.

User: Kevin L. Schwartz

Kevin L. Schwartz's wiki page.

Kevin L. Schwartz has authored 75 sequences. Here are the ten most recent ones:

A362681 The number of steps, starting from n, to reach x<=2 in an iteration x <- 2x - {sum of proper factors of 2x}.

Original entry on oeis.org

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

Keywords

Comments

A proper factor is defined as any divisor of n other than 1 and itself (Derbyshire).
The iteration step is x <- A157449(2x).
The iteration ends on the step after reaching half of any abundant number A005101/2.
a(1682)=7 is the only number over 6 in the first 10^6 terms.
Powers of 2 reach 2 in the first step, and then would enter an infinite loop if the iteration ended only when x <= 1.

References

  • J. Derbyshire, Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics. Penguin, 2004, p. 32.

Crossrefs

Cf. A157449, A005101, A362684 (indices of records).

Programs

  • PARI
    a(n) = my(ret=0); while(n>2, n = 4*n+1-sigma(2*n); ret++); ret; \\ Kevin Ryde, May 09 2023

A362684 a(n) is the index at which n first occurs in A362681.

Original entry on oeis.org

1, 3, 5, 7, 26, 49, 632, 1682
Offset: 0

Keywords

Comments

Among terms n=1..7, each number iterates through the previous terms. For example, the first iteration takes 1682 to 632=a(6), the second takes 632 to 49=a(5) and so forth.
1682 is the only number < 10^6 that requires 7 iterations to reach completion.
a(8), if it exists, is larger than 10^6.
a(8) > 10^9. - Michel Marcus, Oct 11 2023

Examples

			a(7) = 1682 because the first number to require 7 iterations to reach 2 or less is 1682.
Each iteration step is n <- 2n - {sum of proper factors of 2n} = A157449(2n); for n = 1682, this gives 2n = 3364, 3364 - (2 + 4 + 29 + 58 + 116 + 841 + 1682) = 632, which is a(6).
Note that the proper factors of x are all divisors of x other than 1 and x.
		

Crossrefs

Extensions

a(0)=1 prepended by Michel Marcus, Oct 11 2023

A226296 The smallest number beginning with n that can be decomposed into divisors consisting exclusively of the first n semiprimes.

Original entry on oeis.org

16, 24, 3456, 466560, 5927040, 6350400, 771573600, 838252800, 990186120000, 102979356480000, 112378266000000, 12379589782560000, 133730136540000000, 140865976625774400000, 1553794408841875200000, 16774637597496979200000, 17868635701681564800000
Offset: 1

Keywords

Comments

This is to A225903 as semiprimes A001358 are to prime A000040, and as Product of the first n semiprimes A112141 is to Primorials A002110.

Examples

			a(1) = 16, the smallest multiple of the first semiprime (4) that begins with leftmost digit 1.
a(2) = 24 = 4 * 6, the product of the first 2 semiprimes, and already begins with 2.
		

Crossrefs

A226531 Cubes that become prime when their least-significant (rightmost) digit is removed.

Original entry on oeis.org

27, 3375, 4096, 4913, 35937, 97336, 110592, 148877, 421875, 681472, 1191016, 1442897, 1560896, 2628072, 3241792, 3581577, 3869893, 4741632, 5359375, 8998912, 10218313, 12649337, 16777216, 16974593, 21253933, 26730899, 31255875, 32157432, 43986977, 45882712
Offset: 1

Keywords

Examples

			4096 = 16^3, and becomes the prime number 409 when truncated.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000]^3,PrimeQ[Floor[#/10]]&] (* Harvey P. Dale, May 28 2021 *)
  • R
    library(gmp)trimR=function(x) { x=as.character(x); ifelse(nchar(x)<2,0,substr(x,1,nchar(x)-1)) }
    y=as.bigz(rep(0,10000)); len=0; n=as.bigz(-1)
    while(len<10000) if(isprime(trimR((n=n+1)^3))) y[(len=len+1)]=n^3

A226087 Number of values k in base n for which the sum of digits of k = sqrt(k).

Original entry on oeis.org

1, 4, 2, 3, 3, 6, 2, 2, 2, 5, 2, 6, 2, 5, 5, 2, 2, 4, 2, 6, 6, 4, 2, 5, 2, 4, 2, 6, 2, 11, 2, 2, 6, 4, 5, 6, 2, 4, 6, 5, 2, 11, 2, 6, 5, 4, 2, 6, 2, 4, 6, 5, 2, 4, 5, 5, 6, 4, 2, 13, 2, 4, 4, 2, 5, 11, 2, 5, 6, 11, 2, 5, 2, 4, 6, 6, 6, 11, 2, 5, 2, 4, 2, 12, 5
Offset: 2

Keywords

Comments

Values of k in base n have at most 3 digits. Proof: Because sqrt(k) increases faster than the digit sum of k, only numbers with d digits meeting the condition d*(n-1) >= n^(d/2) are candidate fixed points. d < 3 for n > 6, and since there are no fixed points of four or more digits in bases 2 through 5, there are no fixed points in any base with more than 3 digits.
From the above, it can be shown that for three-digit fixed points of the form xyz, x <= 6; also x <= 4 for n > 846. These theoretical upper limits are statistically unlikely, and in fact of the 86356 solutions in bases 2 to 10000, only 6.5% of them begin with 2, and none begin with 3 through 6.

Examples

			For a(16)=5 the solutions are the square numbers {1, 36, 100, 225, 441} because in base 16 they are written as {1, 24, 64, E1, 1B9} and
  sqrt(1) = 1
  sqrt(36) = 6 = 2+4
  sqrt(100) = 10 = 6+4
  sqrt(225) = 15 = 14+1, and
  sqrt(441) = 21 = 1+11+9.
		

Crossrefs

Cf. A226224.
Cf. digital sums for digits at various powers: A007953, A003132, A055012, A055013, A055014, A055015.

Programs

  • R
    sapply(2:16,function(n) sum(sapply((1:(n^ifelse(n>6,1.5,2)))^2, function(x) sum(inbase(x,n))==sqrt(x))))

A226354 Squares that become cubes when their rightmost digit is removed.

Original entry on oeis.org

1, 4, 9, 16, 81, 10000, 640000, 7290000, 40960000, 156250000, 188210961, 466560000, 1176490000, 2621440000, 5314410000, 10000000000, 17715610000, 29859840000, 48268090000, 75295360000, 113906250000, 167772160000, 241375690000, 340122240000, 470458810000
Offset: 1

Keywords

Examples

			188210961=13719^2, while 18821096=266^3.
		

Crossrefs

Programs

  • Mathematica
    cQ[n_]:=IntegerQ[Surd[FromDigits[Most[IntegerDigits[n]]],3]]; Select[Range[ 700000]^2,cQ] (* Harvey P. Dale, Feb 21 2014 *)
  • R
    trimR=function(x) { x=as.character(x); ifelse(nchar(x)<2,0,substr(x,1,nchar(x)-1)) }
    iscube<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(factorize(x)))%%3==0))
    which(sapply(1:6400,function(x) iscube(trimR(x^2))))^2

Formula

For n > 11: a(n)=(100*(n-6)^3)^2 (188210961 is the last "exception" as is easy to prove with the help of the Nagell-Lutz theorem). - Reiner Moewald, Dec 30 2013

A226352 Number of integers k in base n whose squared digits sum to sqrt(k).

Original entry on oeis.org

1, 3, 2, 2, 1, 1, 4, 2, 1, 2, 3, 6, 1, 6, 3, 3, 1, 2, 2, 3, 2, 4, 4, 4, 2, 9, 2, 4, 2, 3, 1, 3, 3, 3, 3, 1, 2, 4, 5, 4, 1, 6, 1, 5, 2, 5, 2, 5, 4, 1, 3, 5, 1, 5, 2, 5, 1, 7, 3, 2, 2, 7, 3, 2, 2, 4, 3, 2, 1, 3, 3, 6, 3, 3, 2, 1, 2, 5, 3, 4, 1, 4, 1, 3, 2, 3, 1
Offset: 2

Keywords

Comments

Any d-digit number in base n meeting the criterion must also meet the condition d*(n-1)^2 < n^(d/2). Numerically, it can be shown this limits the candidate values to squares < 22*n^4. The larger values are statistically unlikely, and in fact the largest value of k in the first 1000 bases is ~9.96*n^4 in base 775.

Examples

			In base 8, the four solutions are the values {1,16,256,2601}, which are written as {1,20,400,5051} in base 8 and
sqrt(1)    =  1 = 1^2;
sqrt(16)   =  4 = 2^2 + 0^2;
sqrt(256)  = 16 = 4^2 + 0^2 + 0^2;
sqrt(2601) = 51 = 5^2 + 0^2 + 5^2 + 1^2,
		

Crossrefs

Cf. A226353.
Cf. digital sums for digits at various powers: A007953, A003132, A055012, A055013, A055014, A055015.

Programs

  • R
    inbase=function(n, b) { x=c(); while(n>=b) { x=c(n%%b, x); n=floor(n/b) }; c(n, x) }
    for(n in 2:50) cat("Base", n, ":", which(sapply((1:(4.7*n^2))^2, function(x) sum(inbase(x, n)^2)==sqrt(x)))^2, "\n")

A226353 Largest integer k in base n whose squared digits sum to sqrt(k).

Original entry on oeis.org

1, 49, 169, 36, 1, 1, 2601, 1089, 1, 8836, 33489, 44100, 1, 149769, 128164, 96721, 1, 156816, 1225, 40804, 12321, 831744, 839056, 1149184, 1737124, 3655744, 407044, 1890625, 2208196, 1089, 1, 1466521, 6125625, 2235025, 2832489, 1, 3759721, 6885376, 8844676
Offset: 2

Keywords

Comments

Any d-digit number in base n meeting the criterion must also meet the condition d*(n-1)^2 < n^(d/2). Numerically, it can be shown this limits the candidate values to squares < 22*n^4. The larger values are statistically unlikely, and in fact the largest value of k in the first 1000 bases is ~9.96*n^4 in base 775.
a(n)=1 iff A226352(n)=1.

Examples

			In base 8, the four solutions are the values {1,16,256,2601}, which are written as {1,20,400,5051} in base 8 and
sqrt(1)   = 1  = 1^2
sqrt(16)  = 4  = 2^2+0^2
sqrt(256) = 16 = 4^2+0^2+0^2
sqrt(2601)= 51 = 5^2+0^2+5^2+1^2
		

Crossrefs

Cf. digital sums for digits at various powers: A007953, A003132, A055012, A055013, A055014, A055015.

Programs

  • R
    inbase=function(n,b) { x=c(); while(n>=b) { x=c(n%%b,x); n=floor(n/b) }; c(n,x) }
    for(n in 2:50) cat("Base",n,":",which(sapply((1:(4.7*n^2))^2,function(x) sum(inbase(x,n)^2)==sqrt(x)))^2,"\n")

A226224 The largest value of k in base n for which the sum of digits of k = sqrt(k).

Original entry on oeis.org

1, 25, 9, 64, 100, 144, 49, 64, 81, 225, 121, 441, 169, 441, 441, 256, 289, 324, 361, 1296, 1296, 484, 529, 1089, 625, 676, 729, 2401, 841, 2601, 961, 1024, 3025, 1156, 2500, 4096, 1369, 1444, 4356, 3136, 1681, 4900, 1849, 5929, 3025, 2116, 2209, 6561, 2401
Offset: 2

Keywords

Comments

There are no values of k in base n with more than 3 digits. Proof: such a value with d digits would need to meet the criterion d*(n-1)>=sqrt(n)^d which establishes an upper limit of 4 digits for 2<=n<=6 and 3 for n>6. Because there are no four digit values of k in bases 2 through 6, k has a maximum of three digits in all bases.
Because k must be a square, there are only sqrt(n)^3 possible values in any base.
From the above, it can be shown that for three-digit fixed points of the form xyz, x <= 6; also x<=4 for n>846. These theoretical upper limits are statistically unlikely, and in fact of the 86356 solutions in bases 2 to 10000, only 6.5% of them begin with 2, and none begin with 3 through 6.
a(n)=1 iff A226087(n)=1. Conjecture: this occurs exactly once -- in base 2.

Examples

			For a(16) the solutions are the square numbers {1, 36=6^2, 100=10^2, 225=15^2, 441=21^2} because in base 16 they are written as {1, 24, 64, E1, 1B9} and 1 = 1, 6 = 2+4, 10 = 6+4, 15 = 14+1, and 21 = 1+11+9.
		

Programs

  • R
    for(n in 2:500) cat("Base",n,":",which(sapply((1:(ifelse(n>6,7,1)*n^ifelse(n>6,1,2)))^2, function(x) sum(inbase(x,n))==sqrt(x)))^2, "\n")

A226064 Largest fixed point in base n for the sum of the fourth power of its digits.

Original entry on oeis.org

1, 1, 243, 419, 1, 1, 273, 1824, 9474, 10657, 1, 8194, 1, 53314, 47314, 36354, 1, 246049, 53808, 378690, 170768, 185027, 1, 247507, 1, 1002324, 722739, 278179, 301299, 334194, 1004643, 959859, 1, 1538803, 1798450, 1, 4168450, 2841074, 1, 1877793, 5556355
Offset: 2

Keywords

Comments

All fixed points in base n have at most 5 digits. Proof: In order to be a fixed point, a number with d digits in base n must meet the condition n^d <= d*(n-1)^4, which is only possible for d < 5.
For 5-digit numbers vwxyz in base n, only numbers where v*n^4 + n^3 - 1 <= v^4 + 3*(n-1)^4 or v*n^4 + n^4 - 1 <= v^4 + 4*(n-1)^4 are possible fixed points. v <= 2 for n <= 250.

Examples

			The fixed points in base 8 are {1,16,17,256,257,272,273}, because in base 8, these are written as {1,20,21,400,401,420,421} and 1^4 = 1, 2^4 + 0^4 = 16, 2^4 + 1^4 = 17, 4^4 + 0^4 + 0^4 = 256, etc. The largest of these is 273 = a(8).
		

Crossrefs

Cf. A226063 (number of fixed points).
Cf. A052455 (fixed points in base 10).

Programs

  • R
    for(b in 2:50) {
        fp=c()
        for(w in 1:b-1) for(x in 1:b-1) if((v1=w^4+x^4)<=(v2=w*b^3+x*b^2))
            for(y in 1:b-1) if((u1=v1+y^4)<=(u2=v2+y*b) & u1+b^4>u2+b-1) {
                z=which(u1+(1:b-1)^4==u2+(1:b-1))-1
                if(length(z)) fp=c(fp,u2+z)
            }
        cat("Base",b,":",fp[-1],"\n")
    }